Aggregating recycle bin items using PowerShell


I’ve always wished since recycle bin was first introduced in SharePoint 2007 that It would be nice from an Administrator perspective to be able to see recycle bin items aggregated so that they can see how much space is being taken up by recycle bin within sites and subwebs. I wrote a simple PowerShell script to accomplish this. If you are interested in the script you can download it from TechNet script repository, here is the direct link for it

Script is fairly straight forward, it loops through recycle bin items from site collections and subwebs and adds it to an array list which is then returned to output. You can simple pipe the output to do things like format-table, filter to see items that are greater than specific size and even sum up all the size values (which is in bytes BTW) to see how much total space recycle bin is taking.

Image below shows recycle bin items aggregated for all site collections and subwebs in a web application


If you want more info about the script head over to the link and check it out



Published: 8/27/2011 9:42 AM

Comments (0)

Skip to main content