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

Note to self …

Which is about the upshot of what this site it.  It has zero SEO, zero content review and probably zero use to anybody other than me.   It’s my scratchpad of things I like to keep, things I have found out and things I find useful.  If anybody else finds things I use useful, feel free to comment and contribute.

Share this post:
read more

1 4 5 6