IAuditSecurity Method: SetAccessFailAudit

 Trustee As String,
 AuditPermissions As String


[in] String Trustee
User or group name for which audit is to be set.

[in] String AuditPermissions
Audit permissions to be set for the Trustee. Refer to Access Permissions for a complete list of audit permissions on a securable object.

Adds "Failure" access audit for the specified permissions. This is equivalent to calling SetAccessAudit with "-" prefixed before the audit permissions.


Dim AuditSec As IAuditSecurity
Set AuditSec= CreateObject("DirectScript.ObjectSecurity")
'Read the auditing information of the file c:\test.txt
AuditSec.AttachFile "c:\test.txt
'Set Write failure "W" audit permissions for "John"
AuditSec.SetAccessFailAudit "John", "W"
'Verify if the audit has been set
Debug.Print AuditSec.IsAuditSet("John", "-W")


See Also