You can use the simple PowerShell script below to check ESX server patching status from your Windows client. Requirements:

  • .NET Framework 2.0
  • PowerShell v1.0
  • plink.exe (from the Putty download page) in your path
  • An account and password to remotely connect over SSH and execute the command esxupdate query.
  • Change the $servers array with your servers and also update the $account and $password variable.
  • Keep the $patches array up-to-date with ESX patch names.

The script:

$patches="ESX-2158032","ESX-1410076","ESX-1006511","ESX-9986131","ESX-8173580","ESX-6921838",
"ESX-2066306","ESX-6075798","ESX-5497987","ESX-3996003","ESX-2092658","ESX-2031037",
"ESX-1917602","ESX-1271657","ESX-9865995","ESX-6856573","ESX-6050503","ESX-5885387",
"ESX-5031800","ESX-3199476","ESX-9916286","ESX-9617902","ESX-8852210","ESX-8174018",
"ESX-7780490","ESX-7737432","ESX-5011126","ESX-3416571","ESX-1161870","ESX-2559638",
"ESX-2257739","ESX-1541239"

$servers="server0","server1"

$account="root"
$password="password"

$servers | % { $a=plink -pw $password $account@$_ "esxupdate query"

$server=$_

$patches | % {

  $patch=$_

  if( [regex]::match($a, $_).success ) {

     $summary="Installed"
  }
  else
 {
    $summary="Not installed"
 }

new-object psobject |
add-member -pass NoteProperty Server $server |
add-member -pass NoteProperty Patch $patch |
add-member -pass NoteProperty Summary $summary

}

}

 Save the above script as a .ps1 file (e.g. c:\patch.ps1) and run it as follows:

./patch.ps1 | ft -groupby server

You will get an overview of all patches grouped by server.