Table of Contents

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.

TypeAdtAuthenticationType
RequiredFalse
PositionNamed
Default valueNone
Accept pipeline inputFalse
Accept wildcard charactersFalse
Accepted valuesWindows, 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.

TypePSCredential
RequiredFalse
PositionNamed
Default valueNone
Accept pipeline inputFalse
Accept wildcard charactersFalse

-Instance

The name of the adTempus instance, for a named instance.

TypeString
RequiredFalse
PositionNamed
Default valueNone
Accept pipeline inputFalse
Accept wildcard charactersFalse

-NotDefault

Opens the connection without making it the default connection.

TypeSwitchParameter
RequiredFalse
PositionNamed
Default valueFalse
Accept pipeline inputFalse
Accept wildcard charactersFalse

-Port

The port number, if the server does not use the default port.

TypeInt32
RequiredFalse
PositionNamed
Default valueNone
Accept pipeline inputFalse
Accept wildcard charactersFalse

-Server

The server name, IP address, or connection descriptor. Omit to connect to the local server.

TypeString
RequiredFalse
Position0
Default valueNone
Accept pipeline inputFalse
Accept wildcard charactersFalse
AliasesComputerName

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.