Installation class

Manages Installation objects.

Syntax

class Installation

Properties

The Installation class provides the following properties:

Property Description
AuditServers property Gets the list of management databases in this installation.
CurrentAuditServer property Gets the currently connected management database.
Name property (audit installation) Gets the name of the audit installation.

Methods

The Installation class provides the following methods:

Method Description
GetAuditStore method Retrieves an audit store given its display name.
Publish method Publishes installation information to Active Directory.

Discussion

An Installation object holds information about a specific audit installation. This class lets you retrieve information about an installation and publish changed information to the Active Directory domain controller so that it can be retrieved by the components of the installation.

See also

AuditServers property

Gets the list of management databases in this installation.

Syntax

AuditServers class AuditServers {get;}

Return value

Returns the list of management databases in the installation.

Discussion

In most cases, an installation includes only one management database.

See also

CurrentAuditServer property

Gets the currently connected management database.

Syntax

AuditServer class CurrentAuditServer {get;}

Return value

Returns the connected management database.

Discussion

You can use the SQL Server instance name property of the management database object returned by this property as a parameter value when you call the Connection.GetInstallation (server,database) method.

See also

Name property (audit installation)

Gets the name of the audit installation.

Syntax

String Name {get;}

Return value

Returns the installation name.

Discussion

The audit installation is named when it is created and this name is not normally changed during the life of the installation.

GetAuditStore method

Retrieves an audit store given its display name.

Syntax

AuditStore class GetAuditStore(

string Name

)

Parameters

Errors

The GetAuditStore method may throw one of the following exceptions:

  • Centrify.DirectAudit.Common.Logic.AuthenticationException if you do not have permission to connect to the Microsoft SQL Server instance or the management database.

  • Centrify.DirectAudit.Common.Logic.ConnectDatabaseException if you cannot connect to the Microsoft SQL Server instance either because the Microsoft SQL Server instance is not running and does not allow remote connections.

Example

The following code sample accepts the audit store display name as an argument when the script is executed, calls the GetAuditStore method to get the audit store, then attaches a new audit store database to the audit store:

...
strInstallationName = wscript.arguments.item(0)
strAuditStoreName = wscript.arguments.item(1)
strServerName = wscript.arguments.item(2)
strDatabaseName = wscript.arguments.item(3)
SET objConnection = CreateObject("Centrify.DirectAudit.Connection")
SET objInstallation = objConnection.GetInstallation(strInstallationName)
SET objAuditStore = objInstallation.GetAuditStore(strAuditStoreName)
today = Date
strDatabaseName = strDatabaseName & "-" & Year(today) & "-" & Month(today) &_
& "-" & Day(today)
SET objAuditStoreDatabase = objAuditStore.GetDatabase(strDatabaseName)
' Create a new Audit Store database and attach to the Audit Store
SET objAuditStoreDatabase = objAuditStore.AddDatabase(strDatabaseName, strServerName, strDatabaseName)

See also

Publish method

Publishes installation information to Active Directory.

Syntax

void Publish()

Errors

The Publish method may throw the following exception:

  • Centrify.DirectAudit.Common.Logic.DirectAuditException if you do not have

    write permission for the installation’s service connection point (SCP)

    object in Active Directory.

Discussion

Audit Manager publishes installation information to a service connection point (SCP) object in Active Directory so that audited computers and collectors can look up the information. For example, collectors publish which audit store they are part of so that once an agent determines which audit store is to receive its audit data, it can determine the list of collectors that service that audit store by querying Active Directory.

When you use the methods in the API to change settings in the installation, you must call the Publish method to write the new settings to the Active Directory domain controller so that other auditing components in the installation can find the new information.

Example

The following code sample illustrates using Installation.Publish in a script:

...
objInstallation.Publish
wscript.echo "Published settings to Active Directory."