Connect-QADService
From PowerGUI Wiki
Connect to the ActiveRoles Server Administration Service via the ActiveRoles Server ADSI Provider, or to a certain Active Directory domain controller or a certain server running an Active Directory Lightweight Directory Services (AD LDS) instance via the regular LDAP ADSI Provider.
This cmdlet is part of the Quest ActiveRoles Server product. Use Get-QARSProductInfo to view information about ActiveRoles Server.
Contents |
Syntax
Connect-QADService [[-Service] <String>] [-Proxy] [-UseGlobalCatalog] [-ConnectionAccount <String>] [-ConnectionPassword <SecureString>] [-Credential <PSCredential>] [-Connection <ArsConnection>] [<CommonParameters>]
Detailed Description
This cmdlet establishes a connection to any available Administration Service, to a specific Administration Service, or directly to a specific Active Directory domain controller or a server running an Active Directory Lightweight Directory Services (AD LDS) instance, with the credentials of the locally logged on user or with the credentials of a specified user. A connection determines the default connection parameters (the server and the security context) for the operations that are performed by the other cmdlets. The default connection parameters are effective until the connection is closed either explicitly or by establishing a new connection, and can be overridden on a per-cmdlet basis.
The cmdlet establishes a connection in the security context of a certain user, so some user credentials must be provided in order to authenticate the user. The cmdlet makes it possible to specify user credentials in a number of ways through the use of the credential-related parameters -ConnectionAccount, -ConnectionPassword, -Credential, and -Connection:
* If no connection-related parameters are specified, the cmdlet uses the credentials of the locally logged on user.
* If the -Credential parameter is specified, the credentials provided by this parameter are used regardless of whether any other credential-related parameters are specified.
* If the -ConnectionAccount and -ConnectionPassword parameters are specified while the -Credential parameter is omitted, the specified user name and password are passed to the cmdlet as the user credentials regardless of whether the -Connection parameter is specified.
* If the -Connection parameter is specified while all the other credential-related parameters are omitted, the cmdlet re-uses the credentials that were used to open the existing connection.
The object that is returned by this cmdlet can be passed as the value of the Connection parameter to any other cmdlet in this snap-in in order to re-use the connection parameters of the existing connection. Note that the object includes information not only about the user credentials or security context, but also about the server to which the connection is established. So, if you pass the object to a cmdlet and omit the Service parameter, the cmdlet will use the server specified by the object you have passed to the cmdlet.
Related Commands
Parameters
| Name | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|
| Service | The fully qualified domain name, NetBIOS name or IP address of the computer running the Administration Service to connect to, or, if the Proxy parameter is not specified, the fully qualified domain name, NetBIOS name or IP address of the AD domain controller or AD LDS server to connect to. In case of AD LDS server, the fully qualified domain name of the server should be specified, with the appropriate port number added to the server name (see examples).
If this parameter is not specified, the -Proxy parameter will cause the cmdlet to attempt a connection to any available Administration Service. If both the -Service and -Proxy parameters are not specified, the cmdlet attempts to connect to any available domain controller in the domain of the computer running the cmdlet. | false | false | |
| Proxy | If this parameter is present, the cmdlet will use the ActiveRoles Server ADSI Provider, so as to establish a connection via ActiveRoles Server. Otherwise, the regular Microsoft LDAP ADSI Provider will be used, so as to establish a direct connection to an AD domain controller or AD LDS server. | false | false | |
| UseGlobalCatalog | This parameter directs the cmdlet to connect to a domain controller that holds the role of the Global Catalog server. When the Proxy parameter is supplied on the command line, UseGlobalCatalog has no effect.
If UseGlobalCatalog is supplied together with the Service parameter that specifies a certain domain controller, the cmdlet connects to the specified domain controller if that domain controller is a Global Catalog server. If the Service parameter specifies a particular domain, then UseGlobalCatalog causes the cmdlet to connect to any available Global Catalog server in that domain. If the Service parameter is omitted, then UseGlobalCatalog causes the cmdlet to connect to any available Global Catalog server in the domain of the computer running the cmdlet. | false | false | |
| ConnectionAccount | The user logon name of the account with which you want to connect, in the form Domain\UserName, or in the form of a user principal name. | false | false | |
| ConnectionPassword | The password of the user account with which you want to connect. The parameter value must be a SecureString object. Use the Read-Host cmdlet provided by Windows PowerShell to pass a SecureString object to this parameter. | false | false | |
| Credential | The user name and password of the user account with which you want to connect, in the form of a PSCredential object. Use the Get-Credential cmdlet provided by Windows PowerShell to pass a PSCredential object to this parameter. | false | false | |
| Connection | With this parameter, the user name and password of an earlier established connection can be re-used to establish a new connection (for example, to a different server). Save in a certain variable the AdsiConnection object returned by the Connect-QADService cmdlet, and then pass that object to this parameter when establishing a new connection. | false | false |
Examples
Example 1
connect-QADService
Connect to any available domain controller with the credentials of the locally logged on user.
Example 2
connect-QADService -service 'localhost' -proxy
Connect to the local Administration Service with the credentials of the locally logged on user.
Example 3
$pw = read-host "Enter password" -AsSecureString C:\PS>connect-QADService -service 'server.company.com' -ConnectionAccount 'company\administrator' -ConnectionPassword $pw
Prompt the user for password within the console window (in text mode); then, connect to a specific domain controller with the user name and password specified.
Example 4
$cred = get-credential C:\PS>$conn = connect-QADService -service 'server.company.com' -credential $cred
Use a dialog box to request a user name and password; then, connect to a specific domain controller with those user name and password, and save the AdsiConnection object in a variable for later use.
Example 5
connect-QADService -Service 'server.domian.local:389'
Connect to the AD LDS instance on 'server.domain.local:389' with the credentials of the locally logged on user.
