Xcacls and taking ownership of user profile folders

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

Hi all,

I'm trying to automate the deletion of roaming user profiles stored on a
file server using a native Win2K script. My problem is with the ownership of
the user profile folders on the server. Xcacls doesn't seem to do the job of
taking ownership of the folder so the script can then give administrator
full permissions & delete it. So far I have:

XCACLS %PRFLLOC% /G %EXECUSER%:O /Y

to take ownership of the folder (where %PRFLLOC% is the location of the
profile folder & %EXECUSER% is the administrative user account that will
take ownership & delete the folder), followed by:

XCACLS %PRFLLOC% /T /G %EXECUSER%:F /Y

I get an access is denied message after the first command. What am I
missing/doing wrong?

Thanks.
 
Use Takeown.exe from win2k/NT Resource Kit. It will assign local admins full
access. I did it for production issue.

Wensi
 
Back
Top