Fails over a corrupted VM to its replica.
This cmdlet is obsolete. The cmdlet still works, but it is recommended to rewrite your scripts using the Start-VBRViReplicaFailover cmdlet.
Platform: VMware, Hyper-V
Start-VBRReplicaFailover [-RestorePoint] <COib> [-Reason <String>] [-Planned] [-RunAsync] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
This cmdlet allows you fail over a corrupted VM to its successfully created replica.
Performing failover is switching to a VM replica in case the original VM is damaged. You can fail over to the latest state of a replica or to any of its good known restore points.
Specifies the replica restore point to which you want to fail over.
Specifies the reason for performing a failover.
Indicates that the command returns immediately without waiting for the task to complete.
Performs planned failover.
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.
This command fails over to the VM replica named "WebServer_ replica" to its latest restore point. The restore point is obtained with Get-VBRRestorePoint and piped down. The restore points of the VM are filtered with Sort-Object method by the "creationtime" property to get the most recent one. The reason is "Configuration recovery". The RunAsync parameter is set to bring the process to the background.
Get-VBRRestorePoint -Name "WebServer_replica" | Sort-Object $_.creationtime -Descending | Select -First 1 | Start-VBRReplicaFailover -Reason "Configuration recovery" -RunAsync
This command fails over to the VM replica represented by the $WebServer_replica_restorepoint variable. The restore point is obtained with Get-VBRRestorePoint and assigned to the variable beforehand. The reason is "Data recovery". The RunAsync parameter is set to bring the process to the background.
Start-VBRReplicaFailover -RestorePoint $WebServer_replica_restorepoint -Reason "Data recovery" -RunAsync