Connect
Establishes a connection to an Active Directory domain controller.
Syntax
void Connect(string server, string username, string password)
Parameters
Specify the following parameters when using this method.
Parameter | Description |
---|---|
server | The name of the Active Directory domain controller to which you are establishing a connection. |
username | The Active Directory user account for connecting to the domain controller. The rights associated with this account used to establish the connection to Active Directory can control the operations you are allowed to perform in a script. |
password | The password for the Active Directory user account connecting to the domain controller. |
Discussion
This method enables you to connect to a specific domain controller using a specific user name and password, if the Active Directory server name, user name, and user password are all valid. This method is not required when you connect to Active Directory using the credentials you used to log on to the computer.
Call Cims.Connect("domaincontroller", NULL, NULL) to use the default user account
Example
The following code sample illustrates using this method in a script:
...
'Specify credentials to use for connecting to Active Directory
cims.Connect(“ginger.ajax.org”, “dane”, “Niles9!”);