VMware Cloud Community
nicholas1982
Hot Shot
Hot Shot
Jump to solution

Get VSAN Object Health Status via PoweCLI

Hi All,

I Need to get the health status of VSAN objects with Powercli. I can use ESXCLI but the output is in the form of some hash table, wondering if there is any other way, i would be happy with the

.vSAN object health       green / yellow  /red ?

$args = $esxcli.vsan.health.cluster.get.CreateArgs()

$args.test = “vSAN object health”

$checkvsan = $esxcli.vsan.health.cluster.get.Invoke($args)

Nicholas
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Isn't that information also available through the VSAN cmdlets that were introduced end last year in the VMware.VimAutomation.Storage module?


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

View solution in original post

0 Kudos
6 Replies
LucD
Leadership
Leadership
Jump to solution

Isn't that information also available through the VSAN cmdlets that were introduced end last year in the VMware.VimAutomation.Storage module?


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

0 Kudos
nicholas1982
Hot Shot
Hot Shot
Jump to solution

I'll have to check that, It didn't cross my mind.

Nicholas
0 Kudos
nicholas1982
Hot Shot
Hot Shot
Jump to solution

Ok I think this is it Test-VsanClusterHealth -Cluster $cluster -TestResultFilter

But I can't find a TestResultFilter for Data > Object Health ?

Nicholas
0 Kudos
LucD
Leadership
Leadership
Jump to solution

IS that for Disk objects?

Does this work?

Get-VsanDisk | Select Name,@{N='State';E={_.ExtensionData.OperationalState}}


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

0 Kudos
nicholas1982
Hot Shot
Hot Shot
Jump to solution

I'm not quite sure if that does it, I need the Cluster VSAN health check status for objects?

Nicholas
0 Kudos
LucD
Leadership
Leadership
Jump to solution

It looks as if you have to go through Get-VsanView and  use VsanVcClusterHealthSystem-vsan-cluster-health-system

William, who else, has an example script up.


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

0 Kudos