Category : Windows

Remove download folders in bulk from Windows terminal server

Remove the contents of download folders from multiple terminal server users.

Tested and working on Windows Server 2012

Get-ChildItem C:Users*Downloads* | Remove-Item

To remove folders within the download folders, and to stop it throwing exceptions when it comes across them add the Recurse flag

Get-ChildItem C:Users*Downloads* | Remove-Item -Recurse


It won’t delete files that are currently open with the users, so either rebooting the terminal server, or just logging everybody off will solve that.

Share this post:
read more