Quick and easy way of upgrading or installing VMware Horizon View Agent with Group Policy GPO

While most enterprise organizations typically have deployment applications such as SCCM for new or upgrades of applications, some smaller companies may not and tasks such as upgrading the VMware Horizon View agent may become quite labour intensive if the environment uses full clone desktops that exceed a count of, say, 20. This was the scenario I faced recently at a small organization and rather than manually logging into each full clone virtual desktop to upgrade the VMware Horizon View agent, I decided to use Group Policy GPO for the task.

The first item we need prior to setting up the GPO is to obtain the command that performs a silent install of the VMware Horizon View agent and this command can be found in the following KB:

https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1019862

The install switches is shown in line item #4:

4. Open a command prompt on the desktop and run this command:

VMware-viewagent.exe /S /V”/qn REBOOT=Reallysuppress”

Note: REBOOT=Reallysuppress suppresses a reboot after the install. If you remove REBOOT=Reallysuppress, the machine automatically reboots after the install.

Since we would like to automatically install the VMware View Agent without any administrator intervention, we will remove the REBOOT=Reallysuppress switch so an auto reboot would be triggered after the install.

As a result, the switches added to the installation executable we’ll be running would be as such: VMware-viewagent.exe /S /V”/qn

Placing the VMware View Agent executable onto a share named ViewAgentShare on a file server named fileserver would look as such:

\fileserverViewAgentShareVMware-viewagent-x86_64-7.0.2-4368292.exe /S /V”/qn

With the above prepared, the next step is to create a GPO, navigate to Computer Configuration > Policies > Windows Settings > Scripts (Startup/Shutdown), double click on Startup then create a batch file as shown in the screenshot below:

image

Once the GPO has been created, proceed to create an OU for the VMware Horizon View agent deployment, place the full clone virtual desktops’ computer objects into the OU, restart the actual VDI and you should see the agent being silently installed.

The only caveat with this method is that you will need to move the computer object out of the deployment OU once the deployment has started or before the desktop reboots or it would attempt to perform another silent install after the restart.

Hope this helps anyone looking for a quick way to deploy a new or upgrade an existing VMwar View agent.