Get-SCACServer

Get-SCACServer

Gets and establishes a connection with an server.

Syntax

Parameter Set: Default
Get-SCACServer [-ServerName] <String> [[-Credential] <PSCredential> ] [[-UserRole] <String> ] [ <CommonParameters>]

Detailed Description

The Get-SCACServer cmdlet gets and establishes a connection with the specified server. You must run this cmdlet prior to running any other cmdlets.

Parameters

-Credential<PSCredential>

Specifies a user account that has permission to perform this action. To generate a PSCredential object, use the Get-Credential cmdlet.

Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-ServerName<String>

Specifies the name of the Server.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-UserRole<String>

Specifies the name of a user role.

Aliases

none

Required?

false

Position?

3

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • System.String, System.Management.Automation.PSCredential, System.String

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.SystemCenter.CloudManager.PowerShell.ACServer

Examples

-------------------------- EXAMPLE 1 --------------------------

Description

-----------

The first command prompts you to supply credentials with permission to connect with the server, and stores the credentials in the $Credentials parameter.

The second command establishes a connection to the App Controller server named AppControllerSvr01 using the credentials stored in $Credentials.

PS C:\> $Credentials = Get-Credential
PS C:\> Get-SCACServer -ServerName "https://AppControllerSvr01.Contoso.com" -Credential $Credentials

-------------------------- EXAMPLE 2 --------------------------

Description

-----------

The first command prompts you to supply credentials with permission to connect with the server, and stores the credentials in the $Credentials parameter.

The second command establishes a connection to the server named AppControllerSvr01 using the credentials stored in $Credentials, and then stores the connection in the $ACServer variable. You can then use $ACServer to provide the server information to other cmdlets.

The last command displays information about the server stored in $ACServer to the user.

PS C:\> $Credentials = Get-Credential
PS C:\> $ACServer = Get-SCACServer -ServerName "https://AppControllerSvr01.Contoso.com" -Credential $Credentials
PS C:\> $ACServer

-------------------------- EXAMPLE 3 --------------------------

Description

-----------

The first command prompts you to supply credentials with permission to connect with the server, and stores the credentials in the $Credentials parameter.

The second command establishes a connection to the server named AppControllerSvr01 with the user role UserRole01 using the credentials stored in $Credentials.

PS C:\> $Credentials = Get-Credential
PS C:\> Get-SCACServer -ServerName "https://AppControllerSvr01.Contoso.com" -Credential $Credentials -UserRole "UserRole01"