Created
June 24, 2016 14:05
-
-
Save thomasrayner/deee859d47241391080f10f12948c1bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$dir = 'c:\temp' | |
$who = 'domain\user' | |
$acl = Get-Acl $dir | |
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule($who,"Modify, DeleteSubdirectoriesAndFiles","ContainerInherit, ObjectInherit","None","Allow") | |
$acl.AddAccessRule($rule) | |
Set-Acl $dir $acl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment