Hi Team,
I'm trying empty the recycle bin on remote computers. I'm using the following code, it works fine on local machine but not on remote machine. Could somebody help me out?
$Shell = New-Object -ComObject Shell.Application
$RecBin = $Shell.Namespace(0xA)
$RecBin.Items() | %{Remove-Item $_.Path -Recurse -Confirm:$false