This is an archive version of the document. To get the most up-to-date information, see the current version.

Add-VBRFailoverPlan

Short Description

Creates failover plans or cloud failover plans.

Applies to

Platform: VMware, Hyper-V

Product Edition: Enterprise, Enterprise Plus, Veeam Universal License

Syntax

This cmdlet provides the following parameter sets:

  • For creating a failover plan

Add-VBRFailoverPlan -Name <string> -FailoverPlanObject <VBRFailoverPlanObject[]> [-Description <string>] [-PrefailoverCommand <string>] [-PostfailoverCommand <string>] [-EnablePublicIpRule]  [<CommonParameters>]

  • For creating a cloud failover plan

Add-VBRFailoverPlan -Name <string> -CloudFailoverPlanObject <VBRCloudFailoverPlanObject[]> [-Description <string>] [-PrefailoverCommand <string>] [-PostfailoverCommand <string>] [-EnablePublicIpRule]  [<CommonParameters>]

Detailed Description

This cmdlet creates the following types of failover plans:

  • Failover plan
  • Cloud failover plan

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

Name

Specifies the name that you want to assign to the failover plan.

True

Named

False

False

Failover
PlanObject

Specifies the array of VMs you want to add to the failover plan.

Accepts VBRFailoverPlanObject type.

True

Named

False

False

Description

Specifies the description of the failover plan.

False

Named

False

False

Prefailover
Command

Specifies the path to the script you want to automatically run before failing over to replicas.

Veeam Backup & Replication provides a 10-minute timeout for the script.

In case the script does not run successfully or timeout ends, the failover is not performed.

False

Named

False

False

Postfailover
Command

Specifies the path to the script you want to automatically run after failing over to replicas is complete.

Veeam Backup & Replication provides a 10- minute timeout for the script.

In case the script does not run successfully or timeout ends, the failover proceeds disregarding script failure.

False

Named

False

False

Cloud
Failover
PlanObject

Specifies the array of VMs replicated to cloud. These VMs will be added to the cloud failover plan.

Accepts VBRCloudFailoverPlanObjecttype.

True

Named

False

False

Enable
PublicIp
Rule

If set, the failover plan will use the public IP rules configured in the VBRFailoverPlanObject or VBRCloudFailoverPlanObject objects.

False

Named

False

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.

Return Type

VBRFailoverPlan

VBRCloudFailoverPlan

Example 1

This example shows how to create a failover plan for a group of VMs: a DNS server and two Microsoft Exchange servers.

  1. Create 3 failover plan objects for the VMs. For details, see New-VBRFailoverPlanObject. Save the objects to $DNS, $MSexchange01 and $MSexchange02 variables.
  2. Run Add-VBRFailoverPlan with the saved variables.

Add-VBRFailoverPlan -Name "MS Exchange Group Failover" -FailoverPlanObject $DNS, $MSexchange01, $MSExchange02 -Description "Failover plan for the mail servers group"

Example 2

[Cloud] This command creates a cloud failover plan named "Cloud Group Failover" for a group of replicas.

  1. Create cloud failover plan objects for the cloud replicas. For details, see New-VBRCloudFailoverPlanObject. Save the objects to $cloudreplica01 and $cloudreplica02 variables.
  2. Run Add-VBRFailoverPlan (cloud parameter set) with the saved variables.

Add-VBRFailoverPlan –Name “Cloud Group Failover” –CloudFailoverPlanObject $cloudreplica01, $cloudreplica02 -Description "Cloud replica failover plan"

Related Commands

New-VBRFailoverPlanObject

New-VBRCloudFailoverPlanObject