Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
grant read execute permissions to a folder via powershell
$path = "C:\Sites\Website123"
$user = "domain\user"
$acl = Get-Acl $path
$arguments = $user, "ReadAndExecute", "ContainerInherit, ObjectInherit", "None", "Allow"
$accessRule = New-Object System.Security.AccessControl.FileSystemAccessRule $arguments
$acl | Set-Acl $path
Copy link

sonik8181 commented Nov 6, 2018

Could you please assist me how can i set Same rights for multiple folders ?

Copy link

olen2006 commented May 7, 2020


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment