Clear-RecycleBin

The Clear-RecycleBin cmdlet returns in PowerShell v7 preview 6 on Windows

PS> Get-Command Clear-RecycleBin -Syntax                                                                               
Clear-RecycleBin [[-DriveLetter] <string[]>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]

To use

PS> Clear-RecycleBin

Will ask for confirmation you want to perform the action

PS> Clear-RecycleBin -Force

or

PS> Clear-RecycleBin -Confirm:$false

Will bypass the need for confirmation

This entry was posted in PowerShell 7. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s