1
1
Is there a way to clone a directory's permissions to a file, and then run that file on another server to recreate those permissions on the recreated structure.
I've got a script to create the directories:
New-Item -Path D:\superuser-data -ItemType directory
Net-Item -Path D:\superuser-data\documents -ItemType directory
Net-Item -Path D:\superuser-data\scripts -ItemType directory
I run that script then setup the permissions to the way I want them with AD accounts on Server A.
Then I want the ability to rerun that script on Server B and then run another script on Server B that sets the permissions to match what I did on Server A.
I'd highly recommend this module for convenience: https://gallery.technet.microsoft.com/scriptcenter/1abd77a5-9c0b-4a2b-acef-90dbb2b84e85 using only
– SimonS – 2018-05-31T10:18:10.743get-acl
andset-acl
can be very head-achy