Empty Recycle Bin

Quick Description This Automation Policy empties the contents of the Recycle Bin on a device.
Applies To On-premises N-able N-central 8.1.0.1086
Last Revised Feb. 29, 2012

Overview

This Automation Policy empties the contents of the Recycle Bin on a device.

Input parameters

No input parameters are required.

Automation policy

Outcome

Contents of Recycle Bin is deleted.

Troubleshooting

Empty contents of Recycle Bin Powershell code:

$Shell = New-Object -ComObject Shell.Application
$RecBin = $Shell.Namespace(0xA)

$RecBin.Items() | %{Remove-Item $_.Path -Recurse -Confirm:$false}