VMware Cloud Community
xacolabril
Expert
Expert
Jump to solution

Host State (red,yellow)?

Hello.

A simple question, I think...

It's possible to know the host status? aka: in Red State, Yellow State or Ok...

I can see that Get-VMHost shows State and ConnectionState attributes. Maybe State?

Thank you in advance.

Best regards.

Xavier Colomé Abril. VMware Certified Professional VCP3, VCP4 and VCP5. [Si encuentras que esta o cualquier otra respuesta ha sido de utilidad, vótalas. Gracias.] [If you find this or any other information helpful or correct, please consider awarding points. Thank you.]
Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Try with

Get-VMHost | Select Name,@{N="Alarm State";E={$_.ExtensionData.overallStatus}}

The State property is depreciated, and it shows Connected/Disconnected/NotResponding/Maintenance.

See the VMHostState enum.


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

View solution in original post

Reply
0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

Try with

Get-VMHost | Select Name,@{N="Alarm State";E={$_.ExtensionData.overallStatus}}

The State property is depreciated, and it shows Connected/Disconnected/NotResponding/Maintenance.

See the VMHostState enum.


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

Reply
0 Kudos
xacolabril
Expert
Expert
Jump to solution

Thank you Luc.

The script works fine.

Best regards!

Xavier Colomé Abril. VMware Certified Professional VCP3, VCP4 and VCP5. [Si encuentras que esta o cualquier otra respuesta ha sido de utilidad, vótalas. Gracias.] [If you find this or any other information helpful or correct, please consider awarding points. Thank you.]
Reply
0 Kudos