> Automation > Policies > Maintenance > Empty Recycle Bin

Empty Recycle Bin

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

Overview

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

Input Parameters

No input parameters 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}