FailoverCluster: Configure Role (foreach VM)

Aus Wiki-WebPerfect
Wechseln zu: Navigation, Suche

Configure Role for all VMs on a Hyper-V Node

  • First connect to the Hyper-V node
  • Run the following foreach-loop:
$VMs = (Get-VM).Name
 
foreach ($vm in $VMs) {
	Get-VM $vm | Add-ClusterVirtualMachineRole
}