Hyper-V 2.0: Get all VM’s in Cluster

Share on:

Quick script to find all VM’s running in a Hyper-V cluster (Windows 2012). You will need to run this command on a Hyper-V host in powershell.

1$clusterNodes = Get-ClusterNode;
2ForEach($item in $clusterNodes)
3{Get-VM -ComputerName $item.Name; }