Get-SCACServer

Applies To: System Center 2012 R2 App Controller

Get-SCACServer

Gets and establishes a connection with an App Controller 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 App Controller server. You must run this cmdlet prior to running any other App Controller 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 App Controller 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.

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: Connect to an App Controller server

The first command prompts you to supply credentials with permission to connect with the App Controller 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: Connect to an App Controller server and store the connection in a variable

The first command prompts you to supply credentials with permission to connect with the App Controller 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, 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 App Controller 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: Connect to an App Controller server with a user role

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

The second command establishes a connection to the App Controller 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"