6

I'd like to be connected to multiple VIservers and list all the VMs + their respective clusters. Is this possible?

I've gotten as far as Get-VM | Select Name,VMHost. What property in place of VMHost would list the cluster?

2 Answers 2

6

Try that

Get-VM | Select-Object -Property Name,@{Name=’Cluster’;Expression={$_.VMHost.Parent}} 

which I found here

Sign up to request clarification or add additional context in comments.

Comments

0

Depending of your use case you could also get the VMs if you know the cluster:

Get-Cluster | Get-VM 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.