fselliott
asked on
How do I write a script to create a user folder and set permissions at the same time?
My goal is to create a user folder, and then assign only the domain admins and the user the ability to open the folder (write, read, edit, etc.).
So far I have:
mkdir \\servername\subfolder\rep orts\TOMJO NES
echo y| Xcacls.vbs \\servername\subfolder\rep orts\TOMJO NES /I REMOVE
echo y| cacls \\servername\subfolder\rep orts\TOMJO NES /E /G "Domain Admins":F "Administrators":F TOMJONES:F
The folder is created, but the permissions are not being set. Please help! Thanks
So far I have:
mkdir \\servername\subfolder\rep
echo y| Xcacls.vbs \\servername\subfolder\rep
echo y| cacls \\servername\subfolder\rep
The folder is created, but the permissions are not being set. Please help! 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
Thank you!
You are more then Welcome and thanks for the points
icacls \\servername\subfolder\rep
icacls \\servername\subfolder\rep
icacls \\servername\subfolder\rep