How to check vmtools version and status using PowerCLI Script – VirtuallyThatGuy

Ever wondered a quicker way to check the vmtools versions and their status in your estate? Well here you go my friend.

 

#​​ VMtools Version and Status

 

# Load the ViProperty

 

New-VIProperty​​ -Name​​ ToolsVersion​​ -ObjectType​​ VirtualMachine​​ `

-ValueFromExtensionProperty​​ ‘config.tools.ToolsVersion’​​ `

-Force

 

New-VIProperty​​ -Name​​ ToolsVersionStatus​​ -ObjectType​​ VirtualMachine​​ -Value​​ {

param($vm)

$vm.ExtensionData.Guest.ToolsVersionStatus

}​​ -Force

 

# Run below command​​ 

 

get-vm​​ |​​ select​​ -property​​ @{N="Name"; E={$_.name}},​​ ToolsVersion,ToolsVersionStatus​​ ,​​ @{N="Cluster";E={Get-Cluster​​ -vm​​ $_}},​​ @{N="vCenter";e={(($_.Uid).split("@")[1]).split(":")[0]}}​​ |​​ ft​​ -a

 

​​ 

 

# VMtools Version and Status

# Load the ViProperty

New-VIProperty -Name ToolsVersion -ObjectType VirtualMachine `
	-ValueFromExtensionProperty ‘config.tools.ToolsVersion’ `
	-Force

New-VIProperty -Name ToolsVersionStatus -ObjectType VirtualMachine -Value {
param($vm)
$vm.ExtensionData.Guest.ToolsVersionStatus
} -Force

# Run below command 

get-vm | select -property @{N="Name"; E={$_.name}}, ToolsVersion,ToolsVersionStatus , @{N="Cluster";E={Get-Cluster -vm $_}}, @{N="vCenter";e={(($_.Uid).split("@")[1]).split(":")[0]}} | ft -a

You May Also Like

About the Author: VirtuallyThatGuy

3 Comments

  1. Puedes indicar un script q me diga cuáles están lista para el update de las vmtools y darle la orden de q se actualicen sin el reinicio…tanto para Windows como Linux, la idea es tener las VMS actualizadas…y q guarde un log

  2. you can indicate by script to perform a massive update of the vmtools under windows and linux without restarting the vms

Leave a Reply

Your email address will not be published. Required fields are marked *