r/PowerShell • u/y2hbk • Dec 04 '23
Script to delete specified folders with input
Hey all.
We have user profiles roaming across various network shares for our virtual users, depending on their geographic location. For example:
\\share1\username\
\\share2\username\
\\share3\username\
I've been trying to figure out a script for our desktop support team so they can run it, get asked for the username and upon providing the name have it purge that profile folders at each share as shown above. This way, I don't have to rely on them remembering to clean things up at each location.
Any suggestions?
0
Upvotes
0
u/Luc-e Dec 04 '23 edited Dec 05 '23
Something like that? Just wrote out of my mind on phone so please check commands lol