Skip to content

Instantly share code, notes, and snippets.

Embed
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.SetAccessRule($accessRule)
$acl | Set-Acl $path
@sonik8181

This comment has been minimized.

Copy link

@sonik8181 sonik8181 commented Nov 6, 2018

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

@olen2006

This comment has been minimized.

Copy link

@olen2006 olen2006 commented May 7, 2020

Nice

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