Get-VMHostHardware cannot receive ESXi 6.5 host information for all areas
search cancel

Get-VMHostHardware cannot receive ESXi 6.5 host information for all areas

book

Article ID: 333528

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

In ESXi 6.5 and later, the WBEM services are disabled by default. When WBEM services are disabled and you run Get-VMHostHardware, memory module data from the corresponding object is not returned. Memory slot count and power supplies data is also not returned. Part of the chassis data might not be returned as well.

Resolution

You can use the following PowerCLI commands to retrieve and modify the WBEM services status.

To retrieve the status:

$esxcli = $vmHost | Get-EsxCli -V2
$esxcli.system.wbem.get() # To retrieve WBEM services status

To set the status:

$esxcli = $vmHost | Get-EsxCli -V2
$WbemArgs = $esxcli.system.wbem.set.CreateArgs() #Create an Arguments list
$WbemArgs.enable = $true # $true to enable $false to disable
$esxcli.system.wbem.set.Invoke($WbemArgs)  # To modify WBEM services status
 
Alternatively, you can enable WBEM by using ESXCLI.
 
esxcli system wbem set -e 1