Last active
March 26, 2020 02:17
-
-
Save hebertviana/a7569060a5e55b33e2fae89b8e12dd3a to your computer and use it in GitHub Desktop.
set permission
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
$mypath = "diretorio" | |
$myacl = Get-Acl $mypath | |
$myaclentry = "Todos","FullControl","Allow" | |
$myaccessrule = New-Object System.Security.AccessControl.FileSystemAccessRule($myaclentry) | |
$myacl.SetAccessRule($myaccessrule) | |
Get-ChildItem -Path "$mypath" -Recurse -Force | Set-Acl -AclObject $myacl -Verbose |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment