Skip to content

Instantly share code, notes, and snippets.

@rschiefer
Created June 29, 2017 20:54
Show Gist options
  • Save rschiefer/f608e3a683e13d80e831f545ef3d5c8a to your computer and use it in GitHub Desktop.
Save rschiefer/f608e3a683e13d80e831f545ef3d5c8a to your computer and use it in GitHub Desktop.
$acl = Get-Acl $sitePath
$permission = "$userDomain\$username","FullControl",$inherit,$propagation,"Allow"
$accessRule = New-Object System.Security.AccessControl.FileSystemAccessRule ($permission)
$acl.AddAccessRule($accessRule)
$acl | Set-Acl $sitePath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment