tacticalrmm/scripts_wip/Win_Folder_Downloads_Clear.ps1

7 lines
222 B
PowerShell
Raw Normal View History

2021-04-27 17:11:30 +00:00
$root="c:\users"
$users=get-childitem -path $root -exclude administrator, public
foreach ($user in $users)
{
$folder= join-path -path $user -childpath "downloads\*"
Get-childitem $folder -recurse | remove-item -force
}