December 23rd, 2015

PowerTip: Clear Recycle Bin with PowerShell 5

Doctor Scripto
Scripter

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

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.