Skip to content

Instantly share code, notes, and snippets.

@sannae
Created February 20, 2023 15:11
Show Gist options
  • Save sannae/a591e02b2ea084596c5b5f8f2e823cbc to your computer and use it in GitHub Desktop.
Save sannae/a591e02b2ea084596c5b5f8f2e823cbc to your computer and use it in GitHub Desktop.
Set FullControl permission on a folder for group Everyone
# Run as administrator!
$sharepath = "YOUR\PATH\HERE"
$Acl = Get-ACL $SharePath
$AccessRule= New-Object System.Security.AccessControl.FileSystemAccessRule("everyone","FullControl","ContainerInherit,Objectinherit","none","Allow")
$Acl.AddAccessRule($AccessRule)
Set-Acl $SharePath $Acl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment