mowgli82 Posted February 2, 2017 Posted February 2, 2017 Hi Guys, I'm trying to script the setup of a new domain for testing etc. I've "made" (with lots of Googling and copy and paste) a script to create all the folders and shares I need on a new domain but i'm struggling with the User Home Directories one. I need to set the permission on "StaffHomeDir" to "Read" for this folder only. when i run the script it creates the folder with the permission except it propagates to any new folder created which isn't ideal when its a users home directory. this is the line I'm struggling with: $rule = New-Object System.Security.AccessControl.FileSystemAccessRule('Users','Read') according to this link https://msdn.microsoft.com/en-us/library/ms229747%28v=vs.110%29.aspx by not adding any flags the permissions should propagate to other folders when they are created unless I am missing something. I'm creating the users folders in AD under the "StaffHomeDir" in the profile tab so it assigns correct permissions to the user. Does this make sense? My powershell is very limited so be gentle and may be going about this the wrong way. Many Thanks in advance
mowgli82 Posted February 2, 2017 Author Posted February 2, 2017 Sorted it with this: $propagation = [system.security.accesscontrol.PropagationFlags]"None"
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now