windows:powershell_commands:set_acl

Set folder ACL with Powershell

$acl = get-acl c:\shared
$newacl = new-object system.security.accesscontrol.filesystemaccessrule("DOMAIN\user","FullControl","Allow")
$acl.SetAccessRule($newacl)
$acl | set-acl c:\shared
get-acl c:\shared | fl
  • windows/powershell_commands/set_acl.txt
  • Last modified: 2021/11/17 14:40
  • by 127.0.0.1