You can connect to vCenter Server using the OAuth2 security context.

Procedure

  1. To generate an API token in VMware Cloud on AWS GovCloud, navigate to https:// console.cloud-us-gov.vmware.com /csp/gateway/portal/#/user/tokens and click Generate Token URL.
  2. Connect to VMware Cloud on AWS GovCloud vCenter Server using PowerCLI, create variables:
    $govCloudVCenter = "vcenter.sddc-a-b-c-d.vmwarevmcgov.com"
  3. Create a SAML Security Context from the OAuth2 Security Context from the previous step.
    $samlSecurityContext = New-VISamlSecurityContext -OAuthSecurityContext $oauthSecurityContext -VCenterServer $govCloudVCenter
  4. Connect to VMware Cloud on AWS GovCloud vCenter Server.
    Connect-VIServer -Server $govCloudVCenter -SamlSecurityContext $samlSecurityContext
  5. After a successful connection, run any vSphere PowerCLI cmdlets.