How to deploy Workspace ONE Access using PowerCLI

When deploying the Workspace ONE Access appliance we would usually login to the vSphere Client and use the Deploy OVF Template function. However unlikely, there might be a case where this interface is not available, so we would then need to find an alternative, such as using PowerCLI to perform this deployment.

PowerCLI is a command-line tool that runs over Windows PowerShell. More details and Download options can be found on the VMware© {code}™ website:

https://code.vmware.com/web/tool/12.1.0/vmware-powercli

For this procedure, I am assuming that PowerCLI is already installed on the “deployment” PC and that the Workspace ONE Access OVA file is already downloaded to this same machine.

The version of Workspace ONE Access I am using is 20.10, there might be slight variations of the settings between versions, but the method of configuring them should be very similar.

1. Launch PowerShell and connect to vCenter using the following command:

Connect-VIServer <vCenter Server Name>

2. When prompted, enter your Admin credentials. Make sure this account has enough permissions to deploy this OVF template.

3. In order to configure the appliance, we will create a variable which will contain all the settings that we define. In order to create this variable, run the following command:

$OVFConfig = Get-OvfConfiguration -Ovf <Path to the OVA file>

4. Read the contents of the variable by typing its name.

$OVFConfig

5. We can “navigate” through the Properties my using a dot (.) between each level. For instance, in order to read the Common property, we would use the following:

$OVFConfig.Common

6. Under Common we can find 3 sub-properties: vamitimezone, ceip, and vami. Following the same dot notation, we can then navigate to those.

$OVFConfig.Common.vamitimezone

7. The sub-property we need to set is the Value one. Under OvfTypeDescription we can see the acceptable values. To set the Value we use an equals (=) sign.

$OVFConfig.Common.vamitimezone.Value = "Europe/London"

8 Read the previous sub-property again in order to check that the Value was set as expected.

9. Repeat this procedure, navigating through all the properties and sub-properties of the variable, until all of them are configured. Below is a list of all the properties I configured.

$OVFConfig.Common.vamitimezone.Value = "Europe/London"
$OVFConfig.Common.ceip.enable.Value = $false
$OVFConfig.Common.vami.hostname.Value = "wsoneaccess.domain.local"
$OVFConfig.DeploymentOption.Value = "small"
$OVFConfig.IpAssignment.IpProtocol.Value = "IPv4"
$OVFConfig.NetworkMapping.Network_1.Value = "<ESXi Port Group>"
$OVFConfig.vami.WorkspaceOneAccess.gateway.Value = "<Gateway IP Address>"
$OVFConfig.vami.WorkspaceOneAccess.domain.Value = "domain.local"
$OVFConfig.vami.WorkspaceOneAccess.searchpath.Value = "domain.local"
$OVFConfig.vami.WorkspaceOneAccess.DNS.Value = "<DNS IP Address>"
$OVFConfig.vami.WorkspaceOneAccess.ip0.Value = "<Appliance IP Address>"
$OVFConfig.vami.WorkspaceOneAccess.netmask0.Value = "<Subnet Mask>"

A few things to bear in mind:

  • Make sure you read the sub-property in order to understand the acceptable values.
  • String values require double quotes (“) and boolean values use a dollar sign ($): $true or $false.
  • The Hostname property should be the FQDN of the appliance, not its short name.

10. In order to deploy the OVF template, we will need to use the Import-VApp PowerCLI command. There can be variations from the following command, which can be found on the documentation at:

https://developer.vmware.com/docs/powercli/latest/vmware.vimautomation.core/commands/import-vapp/#Default

I used the following command to deploy the appliance:

Import-Vapp -Source C:\Temp\identity-manager-20.10.0.0-17035009_OVF10.ova -OvfConfiguration $OVFConfig -Name wsoneaccess -VMHost <ESXi FQDN> -Location <Cluster Name> -Datastore <Datastore Name> -Confirm:$false

This process might take a few minutes. When finished, start the appliance and verify that it is configured and functioning as expected.