Re: need a script to reset the permissions on users home drives



Hi,
Shayne D. Swann wrote:
I have file server that has had it's permissions reset on the NTFS
partition that host the users home drives and the terminal server
users roaming profile. is there a script that can reset the
permissions back for each user?
given you have a list of user names as text file you could download the xcacls.vbs from microsoft.com (or use the not fully bugfixed .exe file from Support Tools) and create a line for each user, like
xcacls d:\home\user01 /T /G domain\user01:C Administrators:F /Y


="xcacls d:\home\" & Users!A2 & " /T /C /G domain\" & Users!A2 & ":C Administrators:F /Y"

given the work*** with the user names us Users, domain stands for the domain name, first user name is listed in A2.
Use the concatenation operator in Excel and fill the lines down, then copy/paste the result into notepad and save it with the extension cmd. Execute the file on the server which hosts the homedrives.
The sequence of the parameters for XCACLS may vary, so check the syntax with one line before doing the script.
Example line changes (not edits) the permissions for the users folder in D:\Home and its subfolders (/T), /C continues on Access denied errors, /Y confirms each line automatically, otherwise you would have to press ok.
Best greetings from Germany
Olaf.


.