ObjectSecurity.SetAuditRuleProtection(Boolean, Boolean) 方法

定義

設定或移除與 ObjectSecurity 物件相關聯的稽核規則保護。 受保護的稽核規則無法透過繼承來由父物件所修改。

public:
 void SetAuditRuleProtection(bool isProtected, bool preserveInheritance);
public void SetAuditRuleProtection (bool isProtected, bool preserveInheritance);
member this.SetAuditRuleProtection : bool * bool -> unit
Public Sub SetAuditRuleProtection (isProtected As Boolean, preserveInheritance As Boolean)

參數

isProtected
Boolean

true 表示保護與 ObjectSecurity 物件相關聯的稽核規則不受繼承;false 表示允許繼承。

preserveInheritance
Boolean

true 表示要保留繼承稽核規則;false 表示移除繼承的稽核規則。 如果 isProtectedfalse,就會忽略這個參數。

例外狀況

這個方法會嘗試從非標準系統存取控制清單 (SACL) 中移除繼承的規則。

適用於