You can deploy Unified Access Gateway to Compute Engine by using the uagdeploygce.ps1 PowerShell command. This command takes all configuration settings from an .ini file and deploys an instance of Unified Access Gateway.

If any existing instance in the Compute Engine has the same name as specified in the General section of the .ini file, the PowerShell script removes the existing instance during deployment and creates a new Unified Access Gateway instance with the same name. This replacement helps while upgrading a Unified Access Gateway appliance or to redeploy the appliance with updated settings.


  1. From the VMware Downloads page for Unified Access Gateway, download the following PowerShell scripts, uagdeploygce.ps1 and uagdeploy.psm1 on your Windows machine.
  2. Start a PowerShell command window and change the directory to the folder that contains the downloaded scripts.
  3. To deploy Unified Access Gateway to the Compute Engine, perform the following:
    1. If you are upgrading to a later version of Unified Access Gateway, edit the .ini file to update the imageName setting to the new image name which is uploaded to the Compute Engine in one of the previous tasks.
      All other configuration parameters in the .ini file must remain the same.
    2. Run the following command depending on whether you choose the interactive or non-interactive mode:
      Mode Command
      .\uagdeploygce.ps1 <ini-filename>.ini

      <ini-filename> is the name of the .ini file prepared in the earlier tasks.

      For example: .\uagdeploygce.ps1 uag1.ini

      uag1.ini is the filename used in the earlier tasks.

      .\uagdeploygce.ps1 <ini-filename> <root-pwd> <admin-pwd> <ceip-yes-no>
      .\uagdeploygce.ps1 <ini-filename> secret <admin-pwd> yes
      • <ini-filename> is the name of the .ini file prepared in the earlier tasks.
      • If passwords are specified on the command line as shown in the command, use the Clear-History PowerShell command after deploying the Unified Access Gateway.
      If you run the uagdeploygce.ps1 command again, the previous Unified Access Gateway instance and associated resources are deleted and replaced with a new instance having the same name. The new .ini file must have all the required configuration parameters so that the Unified Access Gateway appliance is ready for production on first boot.

What to do next

After Unified Access Gateway is deployed to Compute Engine and all settings are applied, the metadata used to apply the Unified Access Gateway appliance's configuration settings in Google Cloud must be removed. To remove the metadata, use the following commands as shown in the example:
gcloud compute instances remove-metadata $uagName --zone=$zone --project $projectId --keys "user-data"