Skip to content

Instantly share code, notes, and snippets.

@karoltheguy
Created February 12, 2019 21:40
Show Gist options
  • Select an option

  • Save karoltheguy/c71473c42592561fde7b1b6e2bfc8e42 to your computer and use it in GitHub Desktop.

Select an option

Save karoltheguy/c71473c42592561fde7b1b6e2bfc8e42 to your computer and use it in GitHub Desktop.
Powershell Set folder permission
$aclfolder "C:\MyFolder"
$acl = Get-Acl $aclfolder
$ar = New-Object System.Security.AccessControl.FileSystemAccessRule("username", "FullControl", "Allow")
$acl.SetAccessRule($ar)
Set-Acl -Path $aclfolder -AclObject $acl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment