Getting Started with VMware Cloud Services cmdlets

Provides cmdlets for managing VMware Cloud Services.

Step 1: Connect to Environment 

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

Option 1:
Connect-Vcs -ApiToken $script:apiToken -SaveApiToken
Option 2:
$oauthSecurityContext = New-VcsOAuthSecurityContext -ApiToken $script:apiToken
Connect-Vcs -OAuthSecurityContext $oauthSecurityContext
Option 3:
$oauthSecurityContext = New-VcsOAuthSecurityContext -VcsServer "" -ApiToken $script:apiToken
Connect-Vcs -Server "" -OAuthSecurityContext $oauthSecurityContext

Step 2: Try a GET Command 

For example when successfully connected you can run the Get-VcsOrganizationRole command.
Get-VcsOrganizationRole -Id "OrganizationRoleId"

Was this page helpful?