Getting Started with VMware.CloudServices Module

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 "console.cloud.vmware.com" -ApiToken $script:apiToken
Connect-Vcs -Server "console.cloud.vmware.com" -OAuthSecurityContext $oauthSecurityContext

Step 2: Try a GET Command 


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

Was this page helpful?