Compartir a través de


Aggregating recycle bin items using PowerShell

Body:

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 https://gallery.technet.microsoft.com/scriptcenter/Script-to-aggregate-5dd4f358

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

recyclebinreport

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

Cheers,

</Ram>

Technorati Tags: SharePoint 2010,PowerShell,Monitoring

Published: 8/27/2011 9:42 AM

Attachments: https://www.spmcm.me/Blog/Lists/Posts/Attachments/42/recyclebinreport_2_3DBFAA46.png
https://www.spmcm.me/Blog/Lists/Posts/Attachments/42/recyclebinreport_thumb_3DBFAA46.png