Use PowerCLI To Check VMware Tools Status

If you’re running a VMware environment you might be wondering if there was a way to use PowerCLI To Check VMware Tools Status. The reason for checking it through the command line is so you can check the virtual machines in bulk. This can be done in the GUI but this option really isn’t scalable.

VMware Tools GUI status

Screenshot for GUI method

As you can see from my screenshot above, I’m up to date on my windows 10 machine. However, as I mentioned already this method is not scalable at all so this is why I prefer the Powershell PowerCLI method.

Understanding The VM Properties in PowerCLI

I should probably start off by explaining the properties that are available with the Get-VM cmdlet as this will lay down the foundation for what we’re trying to do. Anytime you run the command Get-VM -Name MyComputer it will output that VM along with the default properties of Name, PowerState, NumCPUs and MemoryGB.

There are more properties available but just not available from the default output. Thus we will need to pipe it to FL (or Format-List). That would look like this. Get-VM -Name PAC-WIN1001| fl

What I prefer to use when checking what’s available is setting the output into a variable and quickly finding those properties. This way we can use the $VM.Property1.property2 etc..

In our case we’re going to be drilling down to the ExtensionData -> Guest properties and there we will find our vmtools information.

VMware Tools ExtensionData Guest Info

Use PowerCLI To Check VMware Tools Status – Powershell Script

Script Requirements

  • Must have the PowerCLI module installed
  • Must be connected to vCenter server (or individual host) via PowerCLI



Description: Enter the virtual machine name that’s listed in vcenter


Description: Allows pipeline input through the Get-VM cmdlet.


Example 1:
Get-VMToolsStatus -Name VM1, VM2, VM3
Example 2:
Get-VM -Name VM1, VM2, VM3 | Get-VMToolsStatus

PowerCLI To Check VMware Tools Status

This script also supports pipeline input

Powershell PowerCLI Script

Function Get-VMToolsStatus {
    This will check the status of the VMware vmtools status.
    Properties include Name, Status, UpgradeStatus and Version

    Name: Get-VMToolsStatus
    Author: theSysadminChannel
    Version: 1.0
    DateCreated: 2020-Sep-1

    https://thesysadminchannel.com/powercli-check-vmware-tools-status/ -

    Please refer to the -Online version
    help Get-VMToolsStatus -Online


        [Alias("VM", "ComputerName", "VMName")]
        [string[]]  $Name,

        [PSObject[]]  $InputObject

    BEGIN {
        if (-not $Global:DefaultVIServer) {
            Write-Error "Unable to continue.  Please connect to a vCenter Server." -ErrorAction Stop

        #Verifying the object is a VM
        if ($PSBoundParameters.ContainsKey("Name")) {
            $InputObject = Get-VM $Name

        $i = 1
        $Count = $InputObject.Count

        if (($null -eq $InputObject.VMHost) -and ($null -eq $InputObject.MemoryGB)) {
            Write-Error "Invalid data type. A virtual machine object was not found" -ErrorAction Stop

        foreach ($Object in $InputObject) {
            try {
                    Name = $Object.name
                    Status = $Object.ExtensionData.Guest.ToolsStatus
                    UpgradeStatus = $Object.ExtensionData.Guest.ToolsVersionStatus2
                    Version = $Object.ExtensionData.Guest.ToolsVersion
            } catch {
                Write-Error $_.Exception.Message

            } finally {
                if ($PSBoundParameters.ContainsKey("Name")) {
                    $PercentComplete = ($i/$Count).ToString("P")
                    Write-Progress -Activity "Processing VM: $($Object.Name)" -Status "$i/$count : $PercentComplete Complete" -PercentComplete $PercentComplete.Replace("%","")
                } else {
                    Write-Progress -Activity "Processing VM: $($Object.Name)" -Status "Completed: $i"

    END {}

Hopefully you found some value from this post and can now use this script in your environment. It’s always a good idea to do a basic audit to see what’s not up to standard. Speaking of audit, I would also suggest you take a look at the VMware VM Information Script which will give you specific details on host, cluster, datacenter, datastore, network, IP address etc.. It’s actually pretty neat and yours for the taking.

If you’re more into video learning, be sure to check out our Youtube Channel for sysadmin video content.


Hi, my name is Paul and I am a Sysadmin who enjoys working on various technologies from Microsoft, VMWare, Cisco and many others. Join me as I document my trials and tribulations of the daily grind of System Administration.