Wednesday, February 8, 2012

clear blob cahce of all web apps using powershell


Below PowerShell script loops through all the web application in a farm and clears the blob cache. 


$WebAppColl = GET-SPWebApplication
foreach($WebApp in $WebAppColl )
{
                [Microsoft.SharePoint.Publishing.PublishingCache]::FlushBlobCache($WebApp)
Write-Host "Flushed the BLOB cache for:" $WebApp
$$WebApp.Dispose()
}
$WebAppColl.Dispose()

No comments:

Post a Comment