FileSystemSecurity::RemoveAuditRule Method (FileSystemAuditRule^)
Removes all matching allow or deny audit rules from the current file or directory.
Assembly: mscorlib (in mscorlib.dll)
A FileSystemAuditRule object that represents an audit rule to remove from a file or directory.
Return ValueType: System::Boolean
true if the audit rule was removed; otherwise, false
The Deny audit rules or all matching Allow audit rules from the current FileSystemSecurity object. For example, you can use this method to remove all Deny audit rules for a user by passing a FileSystemAuditRule object created using the Deny value, the Failure value, and a user account. When you do this, the method removes any deny rules that specify the Failure value or the Success value.method removes either all matching
The following code example uses the AddAuditRule method to add an audit rule to a file and uses the method to remove the audit rule from the file. You must supply a valid user or group account to run this example.
Available since 2.0