PowerShell Empty Trash

By Xah Lee. Date: . Last updated: .
Clear-RecycleBin
empty trash.

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

list files

list dirs

on dir

on file

Windows config

zip tar

misc


PowerShell in Depth

Programing PowerShell

Value Types

String

Variable

Boolean

Conditional

Data Structure

Loop and Iteration

Input/Output

Function

Profile and Script

Script Examples