Jump to content

Recommended Posts

Posted (edited)

I currently have our current domain and a new domain running with a new way trust!

 

What I want to do is add the new domain permissions on to the folder.

 

For example a shared area might have 3 permissions on it currently

SES\S-Staff

SES\JLBloggs

SES\MLBloggs

 

I want the script to copy the username/group and put our new domain credentials on

 

STAMFORD\S-Staff

STAMFORD\JLBloggs

STAMFORD\MLBloggs

 

Is there a script I could use to do this or otherwise it will be alot of work going through each folder and adding the new permission

 

Thanks

 

Scott@Stamford Endowed Schools

Edited by scottyses
Posted

You could try this. I would try it on dumy folders first before you do it on the live folders just incase! I didnt do this once and regreted it.

 


for /D %%i in (*) do (
calcs %%i /T /P /G STAMFORD\S-Staff:f
cacls %%i /T /E /G STAMFORD\JLBloggs:f
cacls %%i /T /E /G STAMFORD\MLBloggs:f

)

 

This line adds the username of the folder into the permissions

 

cacls %%i /T /E /G mcc\%%i:f

 

So if the folder is called MLBloggs and the logonname is MLBloggs then it will give it permissions over it.

 

Hope this helps.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...