Connect-AdtServer
Synopsis
Connects to an adTempus server.
Syntax
Default
Connect-AdtServer [[-Server] <string>] [-Port <int>] [-Instance <string>]
[-Credential <pscredential>] [-AuthenticationType <AdtAuthenticationType>] [-NotDefault]
Description
Opens a connection to an adTempus server, makes it the default connection for the session, and returns it. Other cmdlets use the default connection unless -Connection or -Server is specified. If no connection has been opened, cmdlets connect to the local server using Windows authentication.
In a script or function that doesn't use the returned connection, assign it to $null (or pipe it to Out-Null) so it isn't included in the output.
Examples
Example 1
Connect-AdtServer -Server sched01
Connects to the default instance on sched01 using the current Windows identity.
Example 2
$connection = Connect-AdtServer -Server sched01 -Credential (Get-Credential) -AuthenticationType Password
Connects using an adTempus user ID and password, and saves the connection in a variable.
Example 3
$null = Connect-AdtServer -Server sched01
Connects without writing the connection to the output, for use in scripts.
Parameters
-AuthenticationType
The authentication method. The default is Windows, or Password if a credential is specified.
| Type | AdtAuthenticationType |
|---|---|
| Required | False |
| Position | Named |
| Default value | None |
| Accept pipeline input | False |
| Accept wildcard characters | False |
| Accepted values | Windows, Password |
-Credential
The credential to connect with. For Windows authentication, the connection uses this Windows identity; for Password authentication, the user ID and password of the adTempus Security Login.
| Type | PSCredential |
|---|---|
| Required | False |
| Position | Named |
| Default value | None |
| Accept pipeline input | False |
| Accept wildcard characters | False |
-Instance
The name of the adTempus instance, for a named instance.
| Type | String |
|---|---|
| Required | False |
| Position | Named |
| Default value | None |
| Accept pipeline input | False |
| Accept wildcard characters | False |
-NotDefault
Opens the connection without making it the default connection.
| Type | SwitchParameter |
|---|---|
| Required | False |
| Position | Named |
| Default value | False |
| Accept pipeline input | False |
| Accept wildcard characters | False |
-Port
The port number, if the server does not use the default port.
| Type | Int32 |
|---|---|
| Required | False |
| Position | Named |
| Default value | None |
| Accept pipeline input | False |
| Accept wildcard characters | False |
-Server
The server name, IP address, or connection descriptor. Omit to connect to the local server.
| Type | String |
|---|---|
| Required | False |
| Position | 0 |
| Default value | None |
| Accept pipeline input | False |
| Accept wildcard characters | False |
| Aliases | ComputerName |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
None
You cannot pipe objects to this cmdlet.
Outputs
ArcanaDevelopment.adTempus.PowerShell.AdtConnection
A connection to an adTempus server, from Connect-AdtServer or Get-AdtConnection.
Notes
Connections stay open for the rest of the PowerShell session, or until they are closed with Disconnect-AdtServer. Objects fetched through a connection can be used only while it is open.