ActiveDirectorySecurity.ResetAccessRule Method (ActiveDirectoryAccessRule)


Searches an object's DACL for all access rules that contain a security identifier (SID) that matches the SID specified in the rule object, and replaces all of those access rules with the access rules that are contained in the rule object.

Namespace:   System.DirectoryServices
Assembly:  System.DirectoryServices (in System.DirectoryServices.dll)

public void ResetAccessRule(
	ActiveDirectoryAccessRule rule


Type: System.DirectoryServices.ActiveDirectoryAccessRule

The ActiveDirectoryAccessRule object to which this operation applies.

When ResetAccessRule is used to replace all access rules with a particular SID in an object's DACL, both Allow- and Deny- type rules are replaced. To replace only Allow rules without affecting Deny rules, or to replace Deny rules without affecting Allow rules, use SetAccessRule instead.

.NET Framework
Available since 2.0
Return to top