Link to home
Start Free TrialLog in
Avatar of jct_777
jct_777Flag for Kuwait

asked on

delete user account and associated redirect folders

We have an environment with around 2000 users (GPO with desktop and my docs redirected to the server) and every year we have a few hundred users leaving. Is there a way we can delete the user accounts and associated redirected folders at once?

Thanks in advance
Avatar of Benjamin Voglar
Benjamin Voglar
Flag of Slovenia image

Avatar of jct_777

ASKER

Thanks Benjamin. Not what I was looking for.
So do you want to be able to have script, enter a username, take ownership of those files, and then delete them? And then also have them deleted from AD? What about shares associated with users?
Avatar of jct_777

ASKER

Yes Lionelmm. No shares associated with users
SOLUTION
Avatar of Lionel MM
Lionel MM
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jct_777

ASKER

Hi Lionelmm,

Looks good. I'd rather put it into a text file for the script to read when it run.

Thanks
OK so only missing piece is how, what variable do we need to know to be able to know which folders to delete, that is associated with each user's name. In other words what is the variable for Y:\Redirected\Folder2Delete I assume it is related to their username somehow so is it  Y:\Redirected\%username%?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Glad to have helped--did it work as you wanted it to?