Monday, August 27, 2012

Clear your recycle-bin with PowerShell.

My team recently developed this script....it'll clear your recycle-bin with PowerShell & no need to do it 200 at a time.

$url = "http://your site name/sites/site";
$siteCollection = New-Object Microsoft.SharePoint.SPSite($url);
$siteCollection.RecycleBin.Count;
$siteCollection.RecycleBin.DeleteAll();
$siteCollection.Dispose();

Cheers!!!

No comments: