To connect to VMware Cloud on AWS through an OAuth 2.0 authentication mechanism, you need an OAuth security context for the VMware Cloud services platform.

You can create an OAuth security context by using the New-VcsOAuthSecurityContext cmdlet.

Prerequisites

Use the VMware Cloud service web portal to generate an API token for authentication with PowerCLI.

Procedure

  1. Create an OAuth security context for the VMware Cloud services platform by using an API token.
    $oauthSecContext = New-VcsOAuthSecurityContext -ApiToken "Your API token" 
    
  2. Connect to VMware Cloud on AWS by using an OAuth security context.
    Connect-Vmc -OAuthSecurityContext $oauthSecContext