This is an excerpt from Manning's book PowerShell in Practice. Login to get full access to this book.
Listing 7.14. Opening the recycle bin
Listing 7.15. Emptying the recycle bin $a = New-Object –ComObject Shell.Application $rb = $a.NameSpace(0xa).Self $rb.InvokeVerb("Empty Recycle &Bin")