PowerShell Empty Trash

By Xah Lee. Date: .

write a function empty-trash to call Clear-RecycleBin. So it's much easier to type.

put this in your PowerShell Profile

function empty-trash {
    # .DESCRIPTION
    # call Clear-RecycleBin -force
    Clear-RecycleBin -Force
}

PowerShell

Practical How-To

PowerShell in Depth

Programing PowerShell

String

Variable

Boolean

Conditional

Data Structure

Loop and Iteration

Input/Output

Function

Profile and Script

Script Examples