There is command to install agent silently.
Open a Windows command prompt on the virtual machine or physical PC.
Type the installation command on one line.
The following example installs Horizon Agent with the components Core, VMware Blast, PCoIP, Unity Touch, VmVideo, PSG, View Composer Agent, Virtual Printing, USB redirection, and Real-Time Audio-Video components.
VMware-Horizon-Agent-x86-y.y.y-xxxxxx.exe /s /v"/qn VDM_VC_MANAGED_AGENT=1 ADDLOCAL=Core,SVIAgent,ThinPrint,USB,RTAV"
The following example installs Horizon Agent on an unmanaged computer and registers the desktop with the specified View Connection Server, cs1.companydomain.com. In addition, the installer installs the Core, VMware Blast, PCoIP, Unity Touch, VmVideo, PSG, Virtual Printing, and USB redirection components.
VMware-Horizon-Agent-x86-y.y.y-xxxxxx.exe /s /v"/qn VDM_VC_MANAGED_AGENT=0 VDM_SERVER_NAME=cs1.companydomain.com VDM_SERVER_USERNAME=admin.companydomain.com VDM_SERVER_PASSWORD=secret ADDLOCAL=Core,ThinPrint,USB"
If you install Horizon Agent on a Windows Server machine, and you intend to configure the machine as a single-user View desktop rather than as an RDS host, you must include the VDM_FORCE_DESKTOP_AGENT=1 property in the installation command. This requirement applies to machines that are managed by vCenter Server and unmanaged machines.
Refer to Install Horizon Agent Silently
This worked the last time I tried it a few years ago
$application = Get-WmiObject Win32_Product -filter "Name='VMware Horizon View Agent'"