A: Using Windows PowerShell, far more granular control is available over the planned failover process than if you used the Hyper-V Manager GUI. Here's how to failover using PowerShell:

  1. Shutdown the virtual machine (VM):
        <pre>Stop-VM –VMName <vmname> –ComputerName <Hyper-V Primary server></pre>
        <br>
  2. Prepare the VM for failover:
        <pre>Start-VMFailover –VMName <vmname> –ComputerName <Hyper-V Primary server> –Prepare</pre>
        <br>
  3. Prepare the VM for failover on the Hyper-V Replica server:
        <pre>Start-VMFailover –VMName <vmname> –ComputerName <Hyper-V Replica server></pre>
        <br>
  4. Start the VM on the replica and perform any testing:
        <pre>Start-VM –VMName <vmname> –ComputerName <Hyper-V Replica server></pre>
        <br>
  5. Reverse the replication from the replica server to the primary:

    <code>Set-VMReplication -VMName <vmname> -ComputerName <Hyper-V Replica server> –Reverse</code>