-
-
Save p0w3rsh3ll/ce24635c5457d005ca79937c41ff0786 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set a Deny of user on .pdf key | |
$acl = Get-Acl -Path $extRegKeyPath | |
$rule = New-Object System.Security.AccessControl.RegistryAccessRule ( | |
$user, | |
([System.Security.AccessControl.RegistryRights]::CreateSubKey+[System.Security.AccessControl.RegistryRights]::ChangePermissions), | |
[System.Security.AccessControl.AccessControlType]::Deny | |
) | |
$null = $acl.AddAccessRule($rule) | |
Set-Acl -Path $acl.Path -AclObject $acl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment