Difference between revisions of "Silent Install View Agent"

From Michael's Information Zone
Jump to navigation Jump to search
Line 19: Line 19:
  
 
===Remove VMTools===
 
===Remove VMTools===
 
+
*Using CIM instead of WMI
====Initial Attempt====
 
<pre>(Get-WmiObject -Class win32_product -ComputerName "testcomputer" | where {$_.name -match 'vmware tools'}).uninstall</pre>
 
====Using CIM instead of WMI====
 
 
<ref>https://social.technet.microsoft.com/Forums/en-US/8ab6ee89-8ec3-47ea-9307-a504b22ad23f/uninstall-software-remotely-with-powershell?forum=ITCG</ref>
 
<ref>https://social.technet.microsoft.com/Forums/en-US/8ab6ee89-8ec3-47ea-9307-a504b22ad23f/uninstall-software-remotely-with-powershell?forum=ITCG</ref>
 
<ref>https://docs.microsoft.com/en-us/windows/desktop/wmisdk/wql-sql-for-wmi</ref>
 
<ref>https://docs.microsoft.com/en-us/windows/desktop/wmisdk/wql-sql-for-wmi</ref>
<pre>Invoke-Command -ComputerName testcomputer -ScriptBlock {Get-Ciminstance -classname win32_product -filter "name like 'Vmware Horizon Agent'" | Invoke-Cimmethod -methodname uninstall}</pre>
+
<pre>Invoke-Command -ComputerName testcomputer -ScriptBlock {Get-Ciminstance -classname win32_product -filter "name like 'Vmware Tools'" | Invoke-Cimmethod -methodname uninstall}</pre>
  
 
===Remove Horizon Agent===
 
===Remove Horizon Agent===
<pre>Get-WmiObject -Class win32_product -ComputerName "testcomputer" | where {$_.name -match 'vmware horizon agent'}</pre>
+
<pre>Invoke-Command -ComputerName testcomputer -ScriptBlock {Get-Ciminstance -classname win32_product -filter "name like 'Vmware Horizon Agent'" | Invoke-Cimmethod -methodname</pre>
  
 
===VMTools Install Options===
 
===VMTools Install Options===

Revision as of 10:50, 14 February 2019

[1] [2] [3] [4]

Upgrade Horizon Agent

No easy way to do this. Consultants and the internet state you need to

  1. Uninstall Agent
  2. Reboot
  3. Uninstall VMTools
  4. Reboot
  5. Install VMTools
  6. Reboot
  7. Install Agent



There was one desktop that I was unable to gain access, which made it difficult to remove the software. Found an article [5] that explained how to use wmic to remotely remove software. This is the process I am working on to automate some of this process when using full clones instead of linked clones.

[6]

Remove VMTools

  • Using CIM instead of WMI

[7] [8]

Invoke-Command -ComputerName testcomputer -ScriptBlock {Get-Ciminstance -classname win32_product -filter "name like 'Vmware Tools'" | Invoke-Cimmethod -methodname uninstall}

Remove Horizon Agent

Invoke-Command -ComputerName testcomputer -ScriptBlock {Get-Ciminstance -classname win32_product -filter "name like 'Vmware Horizon Agent'" | Invoke-Cimmethod -methodname

VMTools Install Options

[9][10]

setup64.exe /s /v"/qn /l*v c:\vtools.log ADDLOCAL=ALL"

Agent Install Options

[11]

VMware-Horizon-Agent-x86_64-7.7.0-11054235.exe /v" /qn INSTALL_VDISPLAY_DRIVER=1 /l*v c:\H477.log ADDLOCAL=Core,USB,RTAV,ClientDriveRedirection,ScannerRedirection,GEOREDIR,ThinPrint,SmartCard,VmwVaudio,SdoSensor,PerfTracker"