Getting Started with VMware Cloud Services cmdlets
Provides cmdlets for managing VMware Cloud Services.
Step 1: Connect to Environment
# Connects to a VMware Cloud Services server.
Connect-Vcs -ApiToken $apiToken
You can also connect to remote environment by running one of the alternative options to connect below:
Option 1 :
# Connects to a VMware Cloud Services server by specifying the related secure connection token and saving it for later use.
Connect-Vcs -ApiToken $script:apiToken -SaveApiToken
Option 2 :
# 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.
$oauthSecurityContext = New-VcsOAuthSecurityContext -ApiToken $script:apiToken Connect-Vcs -OAuthSecurityContext $oauthSecurityContext
Option 3 :
# 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.
$oauthSecurityContext = New-VcsOAuthSecurityContext -VcsServer "console.cloud.vmware.com" -ApiToken $script:apiToken Connect-Vcs -Server "console.cloud.vmware.com" -OAuthSecurityContext $oauthSecurityContext
Step 2: Retrieve a object by running a Get command
# Retrieves the organization role with an "OrganizationRoleId" ID.
Get-VcsOrganizationRole -Id "OrganizationRoleId"