Syntax
Connect-CisServer [-Server] <String[]> -Credential <PSCredential> [-Force] [-NotDefault] [-Port <Int32>] [-SaveCredentials] [<CommonParameters>]Related Commands
Online VersionDetailed Description
This cmdlet establishes a connection to the vSphere Automation SDK server specified by the -Server parameter.Parameters
Return Type
CisServerNotes
Examples
-------------------------- Example 1 --------------------------
Connect-CisServer -Server $serverAddress -User $user -Password $pass
Connects to a vSphere Automation SDK server by using the User and Password parameters.
-------------------------- Example 2 --------------------------
$credential = Get-Credential Connect-CisServer -Server $serverAddress -Credential $credential
Connects to a vSphere Automation SDK server by using the Credential parameter.
-------------------------- Example 3 --------------------------
$serverConnection = Connect-CisServer -Server $serverAddress -User $user -Password $pass Connect-CisServer -Server $serverAddress -SessionSecret $serverConnection.SessionSecret
Connects to a vSphere Automation SDK server by using the SessionSecret parameter.
-------------------------- Example 4 --------------------------
Connect-CisServer -Server $serverAddress -Credential -User $user -Password $pass -SaveCredential
Connects to a vSphere Automation SDK server and stores the credentials in the credential store.
-------------------------- Example 5 --------------------------
Connect-CisServer -Server $serverAddress -User $user
Connects to a vSphere Automation SDK server when a record for the specified user is available in the credential store.
-------------------------- Example 6 --------------------------
$oauthCtx = New-VcsOAuthSecurityContext -ApiToken "a3f35067-80b5-44f0-a0bc-e19f2bc17fb7" $samlCtx = New-VISamlSecurityContext -VCenterServer $serverAddress -OAuthSecurityContext $oauthCtx Connect-CisServer -Server $serverAddress -SamlSecurityContext $samlCtx
Connects to a vSphere Automation SDK server that runs in a VMware managed cloud using an API token from the VMware Cloud Services portal.