Getting Started with VMware Cloud on AWS cmdlets

Provides cmdlets for managing VMware Cloud on AWS features.

Step 1: Connect to Environment 


To setup a connection you should use the Connect-Vmc command. Run the code sample below to connect.
Connect-Vmc -ApiToken $apiToken
You can also connect to remote environment by running one of the alternative options to connect below:

Option 1:
Connect-Vmc -ApiToken $script:apiToken -SaveApiToken
Option 2:
$oauthSecurityContext = New-VcsOAuthSecurityContext -ApiToken $script:apiToken
Connect-Vmc -OAuthSecurityContext $oauthSecurityContext
Option 3:
$oauthSecurityContext = New-VcsOAuthSecurityContext -VcsServer "console.cloud.vmware.com" -ApiToken $script:apiToken
Connect-Vmc -Server "vmc.vmware.com" -OAuthSecurityContext $oauthSecurityContext

Step 2: Try a GET Command 


For example when successfully connected you can run the Get-AwsAccount command.
Get-AwsAccount -Server $server
Feedback

Was this page helpful?