Help Center
Choose product document...
Veeam Backup & Replication 9.5
PowerShell Reference

Add-VBRFailoverPlan

Short Description

Creates failover plans or cloud failover plans.

Applies to

Platform: VMware, Hyper-V

Product Edition: Enterprise, Enterprise Plus

Syntax

This cmdlet provides two 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 a failover plan or a cloud failover plan.

To add VMs to your failover plan, you need to create one or more failover plan objects. A failover plan object is a PowerShell object that contains a VM. You need to create a separate failover plan object for each VM you want to add to the plan.

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

Name

Specifies the name 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 VM(s) 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 about common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.

Return Type

VBRFailoverPlan

VBRCloudFailoverPlan

Example 1

This command creates a failover plan named "MS Exchange Group Failover" 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.

PS C:\PS> 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.

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

Related Commands

New-VBRFailoverPlanObject

New-VBRCloudFailoverPlanObject

Veeam Large Logo

User Guide for VMware vSphere

User Guide for Microsoft Hyper-V

Enterprise Manager User Guide

Veeam Cloud Connect Guide

Veeam Backup Explorers User Guide

PowerShell Reference

RESTful API Reference

Veeam Backup FREE Edition User Guide

Veeam Backup for Microsoft Office 365

Veeam ONE Documentation

Veeam Endpoint Backup Documentation

Veeam Management Pack Documentation