IAuditSecurity Method: SetAccessAudit

SetAccessAudit
(
 Trustee As String,
 AuditPermissions As String
);

Parameters

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

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

A "+" prefix before the audit permission indicates auditing a "successful" access, while a "-" indicates auditing a "failed" access. For example, RX-WD will audit successful read and execute (RX) accesses and failed write and delete (WD) accesses.

Specifying a NULL or empty string for this parameter removes all existing auditing permissions that the Trustee currently has on the object. The string could be either "VbNull" or "vbEmptyString".

Description
Sets the specified audit permissions. The function first removes all existing audit permissions for the trustee and then adds the specified audit permissions.

Example

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 (success and failure) "W-W" audit permissions for "John"
AuditSec.SetAccessAudit "John", "W-W"

 

See Also

508 Resource Limit Is Reached

Resource Limit Is Reached

The website is temporarily unable to service your request as it exceeded resource limit. Please try again later.