PowerTip: Clear Recycle Bin with PowerShell 5

Doctor Scripto

Summary: Easily purge the Recycle Bin on a targeted drive with PowerShell 5.

Hey, Scripting Guy! Question How can I use Windows PowerShell to easily flush out the Recycle Bin?

Hey, Scripting Guy! Answer In Windows PowerShell 5.0, use the Clear-RecycleBin cmdlet. For example, run the
           following command with elevated rights to purge the Recycle Bin on drive C:

Clear-RecycleBin –DriveLetter C -force