FileSystemSecurity.RemoveAuditRuleSpecific(FileSystemAuditRule) FileSystemSecurity.RemoveAuditRuleSpecific(FileSystemAuditRule) FileSystemSecurity.RemoveAuditRuleSpecific(FileSystemAuditRule) FileSystemSecurity.RemoveAuditRuleSpecific(FileSystemAuditRule) Method

定義

從目前的檔案或目錄中,移除相符的單一允許或拒絕稽核規則。Removes a single matching allow or deny audit rule from the current file or directory.

public:
 void RemoveAuditRuleSpecific(System::Security::AccessControl::FileSystemAuditRule ^ rule);
public void RemoveAuditRuleSpecific (System.Security.AccessControl.FileSystemAuditRule rule);
override this.RemoveAuditRuleSpecific : System.Security.AccessControl.FileSystemAuditRule -> unit
Public Sub RemoveAuditRuleSpecific (rule As FileSystemAuditRule)

參數

rule
FileSystemAuditRule FileSystemAuditRule FileSystemAuditRule FileSystemAuditRule

FileSystemAuditRule 物件,表示要從檔案或目錄中移除的稽核規則。A FileSystemAuditRule object that represents an audit rule to remove from a file or directory.

例外狀況

備註

方法會從Allow目前DenyFileSystemSecurity物件中移除指定的比對審核規則或指定的比對 audit 規則。 RemoveAuditRuleSpecificThe RemoveAuditRuleSpecific method removes the specified matching Deny audit rule or the specified matching Allow audit rule from the current FileSystemSecurity object. 例如, 您可以使用這個方法, 藉Deny由傳遞Failure使用值、值和使用者帳戶所Deny建立FileSystemAuditRule的物件, 為使用者移除指定的審核規則。For example, you can use this method to remove a specified Deny audit rule for a user by passing a FileSystemAuditRule object created using the Deny value, the Failure value, and a user account. 當您這麼做時, RemoveAuditRuleSpecific方法只會移除Failure指定值的拒絕規則。When you do this, the RemoveAuditRuleSpecific method removes only a deny rule that specifies the Failure value. 它不會移除任何指定Success值的拒絕規則。It does not remove any deny rules that specify the Success value.

適用於