# Create the new ACE
$identity = 'domain\group'
$rights = 'FullControl'
$type = 'Allow'
# Folders and files inherit this permission, no need to propagate because it will be inherited
$inheritance = 'ContainerInherit, ObjectInherit'
$propagate = 'None'
$ace = New-Object System.Security.AccessControl.FileSystemAccessRule($identity, $rights, $inheritance, $propagate, $type)
# Apply to existing file system object
$acl = Get-Acl -Path 'YourPath'
$acl.AddAccessRule($ace)
Set-Acl -Path 'YourPath' -AclObject $acl
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter