Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 214147

Re: Hardware sensors

$
0
0

You can get a list of the status of all of the hardware sensors with:

 

$VMHost = Get-VMHost -Name esxi.yourdomain.com

$HealthStatusSystem = Get-View $VMHost.ExtensionData.ConfigManager.HealthStatusSystem

$HardwareStatusInfo = $HealthStatusSystem.Runtime.HardwareStatusInfo

$SystemHealthInfo = $HealthStatusSystem.Runtime.SystemHealthInfo

$SystemHealthInfo.NumericSensorInfo | ForEach-Object {

  if ($_) {

   $Sensor = $_

    $Report = "" | Select-Object VMHost,Device,Type,Status

    $Report.VMHost = $VMHost.Name

    $Report.Device = $Sensor.Name

    $Report.Type   = "Sensor"

    $Report.Status = $Sensor.HealthState.Key

    $Report

  }

}


Viewing all articles
Browse latest Browse all 214147


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>