Whether you are applying a CPU microcode update through a hardware vendor's BIOS update or an ESXi update/upgrade, verifying the CPU microcode revision within ESXi is not as easy as it could be.
Today, if you wanted to get the current CPU microcode revision from ESXi, you would need to enable SSH and then use the vsish interface to retrieve this information by running the following command:
vsish -e cat /hardware/cpu/cpuList/0 | grep "microcode" -A2
While you can retrieve the CPU microcode revision, the method and required interfaces was less than ideal, especially at scale. Given ESXi already exposes a number CPU attributes via the ESXCLI interface, which includes programmatic access when using PowerCLI, I thought it would be a nice feature to also include the CPU microcode revision as part of the output and had filed an internal feature enhancement a few years back.
Today, I am happy to share that the feature I had requested awhile back is now shipping in the latest vSphere 8.0 Update 3 release and can be accessed by using the following existing ESXCLI (local and remote) command:
esxcli hardware cpu list
As you can see from the screenshot above, a new Microcode Revision property is now available and provides the current CPU microcode revision as detected by ESXi.
If you prefer to retrieve the new CPU microcode property using PowerCLI, here is a quick PowerCLI snippet that you can use:
$esxcli = Get-EsxCli –VMHost (Get-VMHost 192.168.30.5) -V2 $esxcli.hardware.cpu.list.Invoke()[0]
Thanks for the comment!