Recently we had a customer have problems loading Failover Cluster Manager (FOCM) mmc. As a result the only way we could manage his Hyper-V environment was using powershell. I kept a note of some useful commands we used:
Shows installed config files for modules that can be imported to the powershell session
Imports the required module.
Lists the resources in the cluster group (VMs in the cluster), shows host they are on and their state (online/offline)
get-clustergroup | findstr Failed
Shows failed resources only (VMs failed to start)
get-clustergroup | findstr <hostname>
Finds a specific resource (handy if you have a large cluster and a long list!)
Start-ClusterGroup -Name “<ResourceName>” –Verbose
We found this one particularly helpful, it gave us added insight into why a resource was failing to start
Move-ClusterVirtualMachineRole -Name “<ResourceName>” -node <HostName>
Performs a live migrate (or move if the machine is off) on a VM to a different node.
Hope they are of some use!