Tuesday, 11 June 2013

Add a Hyper-V virtual machine into a cluster using powershell

Couldn't find anything explaining this online and had to go through the documentation!
To add a non clustered vm to your cluster and enable high availability from powershell, run the following command:

Add-ClusterVirtualMachineRole -VirtualMachine "vmname"

My VM was already created in the cluster shared volume on one of the cluster nodes.