PowerShell Logo Small

Start-VMFailover



This is the built-in help made by Microsoft for the command 'Start-VMFailover', in PowerShell version 3 - as retrieved from Windows version 'Microsoft Windows Server 2012 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Starts failover on a virtual machine.

SYNTAX


Start-VMFailover [-VMName] <String[]> [-AsJob] [-ComputerName <String[]>] [-PassThru] [-Prepare] [-Confirm] [-WhatIf] [<CommonParameters>]
Start-VMFailover [-VM] <VirtualMachine[]> [-AsJob] [-PassThru] -AsTest [-Confirm] [-WhatIf] [<CommonParameters>]
Start-VMFailover [-VMRecoverySnapshot] <VMSnapshot> [-AsJob] [-PassThru] -AsTest [-Confirm] [-WhatIf] [<CommonParameters>]
Start-VMFailover [-VMName] <String[]> [-AsJob] [-ComputerName <String[]>] [-PassThru] -AsTest [-Confirm] [-WhatIf] [<CommonParameters>]
Start-VMFailover [-VM] <VirtualMachine[]> [-AsJob] [-PassThru] [-Prepare] [-Confirm] [-WhatIf] [<CommonParameters>]
Start-VMFailover [-VMRecoverySnapshot] <VMSnapshot> [-AsJob] [-PassThru] [-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Start-VMFailover cmdlet can be used for the following tasks:


Fail over a Replica virtual machine to a chosen recovery point.


Start a planned failover on a primary virtual machine.


Create a test virtual machine on a Replica virtual machine.



<

RELATED LINKS






REMARKS

<

Examples


Example 1

PS C:\>Get-VMSnapshot VM01 –Name Snapshot01 | Start-Failover



This example starts failover of a virtual machine named VM01 with recovery point Snapshot01.

Note: Recovery points are stored as snapshots. To get a list of all snapshots, use the Get-VMSnapshot cmdlet.




Example 2

PS C:\>Start-VMFailover VM01 -AsTest



This example starts a test failover of a virtual machine named VM01.




Example 3

PS C:\>Get-VMSnapshot VM01 –Name Snapshot01 | Start-Failover -AsTest



Starts a test failover of a virtual machine named VM01 with recovery point Snapshot01.




Example 4

PS C:\>Start-VMFailover –Prepare –VMName VM01 -computername MyPrimary.contoso.comPS C:\>Start-VMFailover –VMName VM01 –computername
MyReplica.contoso.comPS C:\>Set-VMReplication –Reverse –VMName VM01 –computername MyReplica.contoso.comPS C:\>Start-VM –VMName VM01
–computername MyReplica.contoso.com



This example shows the cmdlets you use to perform a planned failover. The first command prepares for the planned failover of a primary virtual
machine named VM01 by replicating any pending changes. The second command fails over the Replica virtual machine. The second command fails
over the Replica virtual machine. The third command switches the Replica virtual machine to a primary virtual machine. The third command
starts the virtual machine that has been switched from a Replica virtual machine to a primary virtual machine.