Restart VMware Tools on all Windows VM's

From VI-Toolkit
Jump to navigation Jump to search

After reading the post on http://www.virtualvcp.com/content/view/82/1/ about the VMware Tools status \u201cnot running\u201d and in particular the part about the preferred work around:

   I find that restarting the VMware Tools Service in the guest OS always gets by the problem, but loggin into every single VM that reports the wrong status for it\u2019s VMware Tools could be a bit of a drag. So I choose to do this remotely rather that logging on to each VM.
   From any Windows workstation/server, open a command pompt and run:
       sc \\{vm-name-or-ip-address} stop "VMTools"
       sc \\{vm-name-or-ip-address} start "VMTools"

I thought that can be done via Powershell and the VI Toolkit. So I created the following script that will restart the VMware Tools service on every running Windows VM.

ICT-Freak: Restart VMware Tools on all Windows VM's