Rule protection
Access control lists, by default, inherit rules from parent container objects. Access rule protection blocks propagation of rules from a parent object.
Rule protection can be enabled for the Access ACL using the SetAccessRuleProtection method or for the Audit ACL using the SetAuditRuleProtection method.
Setting rule protection has the same effect as disabling inheritance in the GUI.
Each of the methods expects two arguments. The first argument, isProtected, dictates whether or not the list should be protected. The second argument, preserveInheritance, dictates what should be done with existing inherited entries. Inherited entries can either be copied or discarded.
In the following example, the access rule protection is enabled ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access