Get-SCACServer

Get-SCACServer

Gets and establishes a connection with an server.

構文

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

詳細説明

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

パラメーター

-Credential<PSCredential>

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

エイリアス

なし

必須?

false

位置は?

2

既定値

なし

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

-ServerName<String>

Specifies the name of the Server.

エイリアス

なし

必須?

true

位置は?

1

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-UserRole<String>

Specifies the name of a user role.

エイリアス

なし

必須?

false

位置は?

3

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

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

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

  • Microsoft.SystemCenter.CloudManager.PowerShell.ACServer

Example 1: Connect to an App Controller server

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: 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 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: Connect to an App Controller server with a user role

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"