Shutdown a Virtual Machine on a Hyper-V Cluster
There are several comdlets in the PowerShell module failoverclusters, but I have not found one that actually shuts the VM down.
On TechNet Microsoft describes the cmdlet as:
Stop-ClusterGroup
Take one or more clustered services and applications (also known as resource groups) offline on a failover cluster.
In my experience this cmdlet actually suspends the VM rather than shutting it down.
On the other side, the PowerShell module hyperv provides a cmdlet to shutdown a VM:
Shutdown-VM
Initiates an operating system shutdown operation on the associated child virtual machine
Here is the msdn Acticle that describes the cmdlet.
However, this module is not explicitely targeted for Hyper-V clusters (failover clusters). E.g. if you want to enumerate all VMs on the cluster, you would need to specify the cluster nodes:
Please make sure you installed the Hyper-V Integration Services correctly as described in the msdn Article Managing Hyper-V Integration Service.
If you have not, the VM will be turned off instead of shutting down.