Clear Recycle Bin using Powershell

Scenario: 
You want to clear ALL recycle bins in your site collection (both at the web level and at the site collection level)

PowerShell Script:

 $url = “http://site:port“;  
 Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue;  
 $siteCollection = Get-SPSite($url);  
 $siteCollection.RecycleBin.DeleteAll();  
 $siteCollection.Dispose();  

Leave a Reply