Connection class
Manages an auditing connection.
Syntax
class Connection
Constructors
The Connection class provides the following overloaded constructor:
Constructor | Description |
---|---|
Connection constructor | Creates a Connection object. |
Methods
The Connection class provides the following overloaded method:
Method | Description |
---|---|
GetInstallation method | Retrieves an audit installation by name or by management database connection. |
Discussion
The Active Directory domain controller stores information about the audit installation, including the installation name and the management database being used by the installation. The Connection object provides a way to connect to an Active Directory domain controller and retrieve the installation information stored there.
See also
Connection Constructor
Creates a Connection object.
Syntax
Connection()
Connection(string domainController)
Parameters
Specify the following parameter when needed:
Parameter | Description |
---|---|
domainController | The domain controller of the Active Directory domain to which you wish to connect in order to get information about the audit installation. |
Discussion
The Connection object constructor is overloaded. Use the constructor without parameters to create a connection in the current domain. Use the second version of the constructor if you want to specify the Active Directory domain of the connection in order to administer an audit installation on an Active Directory domain other than the one to which your workstation is joined.
GetInstallation Method
Retrieves an audit installation by name or by management database connection.
Syntax
Installation class GetInstallation(
string installationName)
Installation class GetInstallation(
string server,
string database)
Parameters
Return value
Returns the Installation object found.
Errors
The GetInstallation method may throw the following exception:
-
Centrify.Cfw.DirectoryServices.ServerNotOperationalException if the domain
controller is not operational. Check to make sure you entered the correct
domain name when you called the constructor for the Connection object.
Discussion
The Connection.GetInstallation method is overloaded to provide two ways to search for an installation: by the name of the installation, or by the management database that is part of the installation.
Example
The following code sample illustrates using Connection.GetInstallation in a script to get the Installation object for the audit installation in the current Active Directory domain. The Installation object is then used to get the name of the object store database:
...
SET objInstallation = objConnection.GetInstallation(strInstallationName)
SET objAuditStore = objInstallation.GetAuditStore(strAuditStoreName)
SET objAuditStoreDatabase = objAuditStore.GetDatabase(strDatabaseName)