February 2019
Intermediate to advanced
626 pages
15h 51m
English
Access lists can be copied from one object to another; for example, a template ACL might have been prepared:
$acl = Get-Acl C:\Temp\ACL\4 $acl.SetAccessRuleProtection($true, $true)$acl.Access | Where-Object IdentityReference -like '*\Authenticated Users' | ForEach-Object { $acl.RemoveAccessRule($_) }Set-Acl C:\Temp\ACL\4 –AclObject $acl
This ACL can be applied to another object:
$acl = Get-Acl C:\Temp\ACL\4 Set-Acl C:\Temp\ACL\5 -AclObject $acl
If ACL contains a mixture of inherited and explicit entries, the inherited entries will be discarded.
Access control rules may be copied in a similar manner:
# Get the ACE to copy $ace = (Get-Acl C:\Temp\ACL\3).Access | Where-Object { $_.IdentityReference -like '*\Authenticated ...Read now
Unlock full access