Syntax
Connect-Vcs [-ApiToken <SecureString>] [-NotDefault] [-SaveApiToken] [<CommonParameters>]Related Commands
Detailed Description
This cmdlet establishes a connection to a Cloud Services server. The cmdlet requires an OAuth security context in order to authenticate the user. If you want to specify an API token directly, use the ApiToken parameter.Parameters
Return Type
System.ObjectNotes
Examples
-------------------------- Example 1 --------------------------
Connect-Vcs -ApiToken $apiToken
Connects to a VMware Cloud Services server.
-------------------------- Example 2 --------------------------
Connect-Vcs -ApiToken $script:apiToken -SaveApiToken
Connects to a VMware Cloud Services server by specifying the related secure connection token and saving it for later use.
-------------------------- Example 3 --------------------------
$oauthSecurityContext = New-VcsOAuthSecurityContext -ApiToken $script:apiToken Connect-Vcs -OAuthSecurityContext $oauthSecurityContext
Connects to a VMware Cloud Services server by specifying an OAuth security context. In this case, you can create it by using the API token.
-------------------------- Example 4 --------------------------
$oauthSecurityContext = New-VcsOAuthSecurityContext -VcsServer "console.cloud.vmware.com" -ApiToken $script:apiToken Connect-Vcs -Server "console.cloud.vmware.com" -OAuthSecurityContext $oauthSecurityContext
Connects to a VMware Cloud Services server by explicitly specifying the host name of the VMware Cloud Services and the VMware Cloud Services server for the commercial instance. If you want to use a different instance, you can find the corresponding host names in the Developer Center section of the web portal.