Hi guys,<\/p>\n
i’ve been looking at this for the whole day not knowing what I’m doing wrong.<\/p>\n
I’ll start by saying the goal is to create a personal home folder for users.
\nI don’t want the folder to inherit right.<\/p>\n
The command works but permissions are weird.
\nThe ntfs are blank but once i open advanced permission i see them.
\nBut it doesnt work.<\/p>\n
Here’s the script:<\/p>\n
New-item \\\\server\\Users$\\jeaeli -type directory\n$acl = Get-Acl \\\\server\\Users$\\jeaeli\n$acl | Format-List\n$acl.GetAccessRules($true, $true, [System.Security.Principal.NTAccount])\n$acl.SetAccessRuleProtection($true, $false)\n$acl1 = New-Object System.Security.AccessControl.FileSystemAccessRule \"domain\\jeaeli\",\"Modify\", \"ContainerInherit, ObjectInherit\", \"InheritOnly\", \"Allow\"\n$acl2 = New-Object System.Security.AccessControl.FileSystemAccessRule \"domain\\ITBEXC\",\"FullControl\", \"ContainerInherit, ObjectInherit\", \"InheritOnly\", \"Allow\"\n$acl3 = New-Object System.Security.AccessControl.FileSystemAccessRule \"domain admins\",\"FullControl\", \"ContainerInherit, ObjectInherit\", \"InheritOnly\", \"Allow\"\n$acl.addAccessRule($acl1)\n$acl.addAccessRule($acl2)\n$acl.addAccessRule($acl3)\nSet-Acl \\\\server\\Users$\\jeaeli $acl\n<\/code><\/pre>\nI also don’t want module to add.
\nAny help is appreciated<\/p>","upvoteCount":5,"answerCount":13,"datePublished":"2016-08-22T17:37:57.000Z","author":{"@type":"Person","name":"j-seb","url":"https://community.spiceworks.com/u/j-seb"},"acceptedAnswer":{"@type":"Answer","text":"