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

Add-VBRFailoverPlan

In this article

    Short Description

    Creates failover plan or cloud failover plan.

    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>]

    Related Commands

    New-VBRFailoverPlanObject

    New-VBRCloudFailoverPlanObject

    Return Type

    VBRFailoverPlan

    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 VM(s) you want to add to the failover plan.

    Accepts array of VBRFailoverPlanObject.

    True

    Named

    False

    False

    Description

    Specifies the description of the failover plan.

    If not set, Veeam Backup & Replication will enter date and time of creation by default.

    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 VBRCloudFailoverPlanObject.

    True

    Named

    False

    False

    Enable
    PublicIp
    Rule

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

    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.

    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"