Syntax
Connect-Vmc [-ApiToken <SecureString>] [-NotDefault] [-SaveApiToken] [<CommonParameters>]Related Commands
Online VersionDetailed Description
This cmdlet establishes a connection to ? VMware managed cloud such as the VMware Cloud on AWS 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
VMware.VimAutomation.Vmc.Types.V1.VmcServerNotes
Examples
-------------------------- Example 1 --------------------------
Connect-Vmc -ApiToken $apiToken
Connects to a VMware Cloud on AWS server.
-------------------------- Example 2 --------------------------
Connect-Vmc -ApiToken $script:apiToken -SaveApiToken
Connects to a VMware Cloud on AWS server by specifying the related secure connection token and saving it for later usage.
-------------------------- Example 3 --------------------------
$oauthSecurityContext = New-VcsOAuthSecurityContext -ApiToken $script:apiToken Connect-Vmc -OAuthSecurityContext $oauthSecurityContext
Connects to a VMware Cloud on AWS 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-Vmc -Server "vmc.vmware.com" -OAuthSecurityContext $oauthSecurityContext
Connects to a VMware Cloud on AWS server by explicitly specifying the host name of the VMware Cloud Services and the VMware Cloud on AWS 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.