Powershell Empty Recycle Bin
IntroductionI was doing some site cleanup today and ended up with around 15,000 items in a site collection recycle bin. I started cleaning them out using the GUI.
Powershell 2.0 Empty Recycle Bin
It was SLOW going. There is no way to “Delete All” for the second stage bin. Rather, you have to delete items from the second stage bin one page of items at a time.
Empty Recycle Bin This script allows you to view the contents of the recycle bin in your profile. The first line creates a ComObject and then the second line grabs the Recycling Bin special folder. It then enumerates the items contained in that special folder and removes each of them.
Powershell Empty Recycle Bin Windows 10
Here’s a quick tip on how to delete everything with PowerShell. Empty Recycle BinThe following code will delete EVERYTHING out of both stages of the site collection recycle bin.