VMware Cloud Community
Bunty11
Hot Shot
Hot Shot

check ESXI hardware using PowerCLi

i am planning to Pull a report about the current ESXI HARDWARE status in my enviorment using powercli.

HBA/NICs/MEMORY etc

How do i accomplish this task ? any guidance ?

Tags (1)
Reply
0 Kudos
3 Replies
LucD
Leadership
Leadership

Instead of reinventing the wheel, I would first have a look at some community projects.

There is AsBuiltReport and there is vDocumentation

Check those first, then determine what you are missing.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
Bunty11
Hot Shot
Hot Shot

your this post also seems useful but it doesn't show anything that is Red is color. It only shows Green and Unknown.

checking esxi hardware for problems using powercli

Reply
0 Kudos
LucD
Leadership
Leadership

Did you run it like this?

foreach ($esx in Get-VMHost) {

   $hs = Get-View -Id $esx.ExtensionData.ConfigManager.HealthStatusSystem

   $hs.Runtime.SystemHealthInfo.NumericSensorInfo |

   where {$_.HealthState.Label -notmatch "Green|Unknown"} |

  Select @{N = 'Host'; E = {$esx.Name}}, Name, @{N = 'Health'; E = {$_.HealthState.Label}}

}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos