VMware Cloud Community
AmolPatil
Enthusiast
Enthusiast
Jump to solution

How to know if ESX/ESXi host is in cluster or standalone ?

Hello Experts,

Is there a way to know if ESX/ESXi host is in any cluster or standalone ?

I can pull the hosts information from multiple VC but now i want to know if that particular host is part of cluster or standalone?

It should show standalone if so or else it should give cluster name if it is part of cluster.

Thanks & Regards,

Amol Patil

Regards, Amol Patil VCP 5
Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

You can do something like this

Get-VMHost | select Name,@{N='Standalone';E={$_.ParentId -notmatch 'Cluster'}}


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

You can do something like this

Get-VMHost | select Name,@{N='Standalone';E={$_.ParentId -notmatch 'Cluster'}}


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

Reply
0 Kudos
AmolPatil
Enthusiast
Enthusiast
Jump to solution

Thanks a ton for the hint. Smiley Happy

I will do the further modification.

PowerCLI problem? = LucD is available Smiley Happy

Regards, Amol Patil VCP 5
Reply
0 Kudos