Enable and Flush Site Output Cache using PowerShell

I had a requirement to enable the site output cache across all sites in our web application. I found an excellent script by Travis Smith called Set-SPSiteOutputCache. I downloaded that and simply put a loop wrapper around it. In my settings, I set the cache as Disabled for anonymous users and as Extranet for authenticated users. Enable-SPSiteOutputCache.ps1 <# .SYNOPSIS Enables SharePoint site output cache in all sites. .

read more

Overloading functions inside SharePoint standard script libraries

We had the requirement to hook into events that occur within SharePoint script objects, specifically when a new calendar item is created. One way of doing this is to simply override the action with your code, but that will make the existing function break. Alternatively, you can edit the standard script file or copy the contents of the method and change it into a new signature. Neither of these are good methods as the code may change in an upcoming release or service pack.

read more