If you are planning for the VMware EUC Stack migration or upgrade and want to install the VMware EUC agent, then continue reading. The guidance on uninstalling the existing agents can be found on this blog post – Script uninstall VMware EUC Agents – App Volumes Agent, Horizon Client, DEM Agent, Horizon Agent and VMware Tools | AskAresh
In this script, we shall perform the agents install and reboot the golden image towards the end. There is no need to install the individual agents one by one, instead, sit back, relax and have a coffee!
VMware EUC Agents:
- VMware Horizon Agent (Works on 7.x and 8.x/YYMM)
- Note few MSI switches are deprecated if you still use them, you will have an error code 1603
- VMware Dynamic Environment Manager Agent (Works on 9.x and YYMM)
- VMware App Volumes Agent (Works on 2.x and 4.x/YYMM)
Note – All the above testing is carried out on Windows 10 1909 with PowerShell 5.1. Reboot is required to complete the installation operations.
Pre-requisites:
- Based on your environment, the installation of MSI switches may differ. You may follow this post to identify appropriate details – Comparison VMware Horizon Agent 7.x/8.x (Silent Install) Switches and Properties | AskAresh
- Create a folder called C:\Temp\Agents and place all the MSI/EXE within this folder.
- Make sure to read the installer log files after install is completed and reboot is done
################################################################################################# # Install EUC Agents in the proper order - Horizon Agent , DEM Agent and App Volumes Agent # Reboot the OS towards the end after install all Agents. Look for Exit Code 0 or 3010 # If you notice exit code 1603 there is a installation issue. Refer to my MSI switches blogpost # Comment or Un-comment the Agent that does not apply to your environment # Author - Aresh Sarkari (Twitter - @askaresh) ################################################################################################ ################################################################### # Declare Variables # ################################################################### #Agent Names $HorizonAgentName = "VMware-Horizon-Agent-x86_64*" $DEMAgentName = "VMware Dynamic Environment Manager*" $AppVolumesAgentName = "App Volumes Agent*" $AppVolMGR = "avm001.domain.com" # Manager LB VIP # All the installer Location #Create a folder C:\Temp\Agents and place all the MSI\EXE in there $TempInstallPath = "C:\Temp\Agents" #Log Files location # Go through all the logs post installation $HZlogFile = "C:\Temp\Agents\HZAgent.log" $DEMlogFile = "C:\Temp\Agents\DEMAgent.log" $ApplogFile = "C:\Temp\Agents\AppVolAgent.log" ################################################################### # MSI Arguments Arrary for EUC Agents # ################################################################### # Modify any MSI switched related to the agent here. # Follow this blog post for swithces - https://askaresh.com/2021/06/28/comparision-vmware-horizon-agent-7-x-8-x-silent-install-switches-and-properties/ # VMware Horizon Agent MSI Switches $HZMSIArguments = @( "/qn" "VDM_VC_MANAGED_AGENT=1" "SUPPRESS_RUNONCE_CHECK=1" "VDM_IP_Protocol_Usage=IPv4" "ADDLOCAL=Core,ClientDriveRedirection,NGVC,USB,RTAV,PerfTracker,PrintRedir,HelpDesk,TSMMR,VmwVaudio,V4V" "REBOOT=REallySuppress" "/L*v" $HZlogFile ) # VMware Dynamic Enivornment Agent MSI Switches $DEMMSIArguments = @( "/qn" "ADDLOCAL=FlexEngine" "REBOOT=REallysuppress" "/L*v" $DEMlogFile ) # VMware App Volumes Agent MSI Switches $AppVolMSIArguments = @( "/qn" "MANAGER_ADDR=$AppVolMGR" "MANAGER_PORT=443" "REBOOT=REallysuppress" "EnforceSSLCertificateValidation=0" "/L*v" $ApplogFile ) ################################################################### # Main # ################################################################### # Install VMware Horizon Agent Write-Host "Installing the VMware Horizon Agent" -ForegroundColor Green $HZAgentPath = (Get-ChildItem -Path $TempInstallPath | Where-Object {$_.name -like $HorizonAgentName}).Fullname # The switches "/s /v " is the Install Shield switches and rest of the aruguments are passed with MSI $HZAgentInstall = (Start-Process -Filepath $HZAgentPath -Wait -ArgumentList "/s /v ""$HZMSIArguments" -PassThru) $HZAgentInstall.ExitCode Start-Sleep 20 # Install DEM Agent Write-Host "Installing the VMware DEM Agent" -ForegroundColor Green $DEMPath = (Get-ChildItem -Path $TempInstallPath | Where-Object {$_.name -like $DEMAgentName}).Fullname $DEMAgentInstall = (Start-Process -Filepath $DEMPath -ArgumentList $DEMMSIArguments -Wait -PassThru) $DEMAgentInstall.ExitCode Start-Sleep 20 # Install App Volumes Agent Write-Host "Installing the VMware App Volumes Agent" -ForegroundColor Green $AppVolPath = (Get-ChildItem -Path $TempInstallPath | Where-Object {$_.name -like $AppVolumesAgentName}).Fullname $AppVolAgentInstall = (Start-Process -Filepath $AppVolPath -ArgumentList $AppVolMSIArguments -Wait -PassThru) $AppVolAgentInstall.ExitCode Start-Sleep 20 # Restart the computer Write-Host "Restarting the computer post the VMware EUC Agents install" -ForegroundColor Green Restart-Computer -Force
Git Hub – scripts/vmwareeucagent-install at master · askaresh/scripts (github.com)
A big thanks to Chris H for providing the original blueprint of the script and Wouter for showing me the magical “space” on the switch /v within the Horizon Agent installer. Final thanks to Jishan for the numerous testing cycles and additions to a different version of this script which tackles VMware Tools reboot and continues installing post a reboot.
I hope you will find this script useful to install the VMware EUC agents and never look back to install them individually. A small request if you further enhance the script or make it more creative, I hope you can share it back with me?
Thanks,
Aresh Sarkari
Reference Article – VMware Agent Install order – Agent installation order for Horizon View, Dynamic Environment Manager, and App Volumes (vmware.com)
Recent Comments