AuditStoreDatabases class

Enumerates AuditStoreDatabase objects.

Syntax

class AuditStoreDatabases

Example

In the following code sample, the AuditStore.Databases property returns an AuditStoreDatabases object and a FOR EACH—IN statement is used to enumerate the audit store databases:

...

' Detach any Audit Store databases older than 2 years
FOR EACH objDatabase IN objAuditStore.Databases
    IF DateDiff("d", today, objDatabase.ActiveEndTime) > 728 THEN
        objAuditStore.DetachDatabase(objDatabase)
        wscript.echo "Detached Audit Store database '" & objDatabase.Name & "'."
    END IF
NEXT

See also