In my environment the Get-VMHostPatch cmdlet does not return anything for ESXi 5.1 hosts. For ESXi 4.1 the cmdlet runs as expected. I am sure that the ESXi 5.1 hosts have some patches installed. This looks like a bug to me. Does anyone else see this behaviour?
I tested this with PowerShell v2 and PowerCLI 5.1 Release 1 build 793510.
I first thought you might have forgotten to update the Update Manager PowerCLI package but quickly noticed that Get-VMHostPatch is part of the regular vSphere PowerCLI release.
I can confirm this problem on multiple 5.1 vCenter servers managing 5.0 and 5.1 hosts, directly connected to hosts too:
VMware vSphere PowerCLI 5.1 Release 1 build 793510
VMWare AutoDeploy PowerCLI Component 5.1 build 768137
VMWare ImageBuilder PowerCLI Component 5.1 build 768137
VMware License PowerCLI Component 5.1 build 669840
VMware VDS vSphere PowerCLI Component 4.1.1 build 000001
VMware vSphere PowerCLI Component 5.1 build 793489
VMware vSphere Update Manager PowerCLI 5.1 build 782803
Seems like this isn't quite a new issue either:
So it looks like the only reliable check for patches at the moment would be via Get-EsxCli?
So it looks like this problem was introduced in vSphere 5.0. Maybe someone from the PowerCLI team can shine a light on this?
Thanks for reporting this issue, I have raised a bug for this.
Thanks for raising this as bug. Do you have any update on this bug or bug reference so that we can contact VMware Technical Support.
Did this fixed ?
BTW i ran,
get-vmhost |get-vmhostpatch |select-object -property vmhost,installdate,id,Description
but it works only for some version of 4.1
But what i am looking for is o/p in below format :-
Hostname xxxx - ESXi 5.0 Update 3 - 1311175 (build num) - Installer Build Number if any
Can someone pls guide .. (I know i can get the build # from get-vmhost ..)
Also 1 more observation... as we know this works only for esxi 4.1... but i checked its not working for
ESX 4.1 GA And ESX 4.1 Update 1 - 348481
I tested for ESXi/ESX 4.1 Patch 10 & it came well.