Script Dumpster: Clean-RedirectedRecycleBin

The problem

Redirected Folders on RDS Session hosts tend to cause a specific issue:

Each user’s set of Redirected Folders creates their own Recycle Bin entry, which can grow quite a bit.
The following function can display a list of files contained within the Recycle Bins older than the provided age.

Even better, the script has a switch parameter Remove which does exactly what you think it does 🙂

Through a scheduled task you can run this script on a regular basis when required.

The Script




It never hurts to Get-Help

Leave a Reply

Your email address will not be published. Required fields are marked *