ucstechinfo
asked on
Best way to delete old TS profiles on \\server\share
Hello all,
2003 sp1 Terminal Servers and DC's.
I have a share set aside for ts profiles. It's more or less full. There are a number of older profiles I would like to remove. I understand that these profiles are created with only the user as owner and no other access. I can, one-by-one, take ownership and delete them..but that's really tedious. Does anyone have a good way to delete a bunch (but not all) ts profiles en masse? I've got Enterprise Admin Creds.
I set the GPO Computer Config -> Administrative Templates -> System -> User Profiles -> Add Adminstrators security group to roaming user profiles
to enable. I then logged onto the TS with a fresh user...logged off and verified the new profile was copied to the share. I still lacked access. My suspicion is that roaming is not equal to TS roaming...
thanks,
2003 sp1 Terminal Servers and DC's.
I have a share set aside for ts profiles. It's more or less full. There are a number of older profiles I would like to remove. I understand that these profiles are created with only the user as owner and no other access. I can, one-by-one, take ownership and delete them..but that's really tedious. Does anyone have a good way to delete a bunch (but not all) ts profiles en masse? I've got Enterprise Admin Creds.
I set the GPO Computer Config -> Administrative Templates -> System -> User Profiles -> Add Adminstrators security group to roaming user profiles
to enable. I then logged onto the TS with a fresh user...logged off and verified the new profile was copied to the share. I still lacked access. My suspicion is that roaming is not equal to TS roaming...
thanks,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
takeown did the trick.
Here's what I'm doing: takeown /R /d y /F whateverthefoldernameis
This isn't enough by itself...you still need to use cacls for a few stubborn files:
echo y| cacls whateverthefoldernameis /t /g username:f
Now I'm looking to put this together into a .vbs script and pass a csv to the. This is ambitious as I'm a vbs noob.
Any pointers would be appreciated