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

Set-VBRFailoverPlan

Short Description

Modifies a selected failover plan or cloud failover plan.

Applies to

Platform: VMware, Hyper-V

Product Edition: Enterprise, Enterprise Plus, Veeam Universal License

Syntax

Set-VBRFailoverPlan -FailoverPlan <VBRFailoverPlan> [-Name <string>] [-Description <string>] [-FailoverPlanObject <VBRFailoverPlanObject[]>] [-PrefailoverCommand <string>] [-PostfailoverCommand <string>] [-EnablePublicIpRule] [-PassThru]  [<CommonParameters>]

Detailed Description

This cmdlet modifies settings of an existing failover plan or cloud failover plan. To modify settings, you need to specify new values for the necessary parameters. The parameters that you omit will remain unchanged.

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

FailoverPlan

Specifies the failover plan or cloud failover plan you want to modify.

Accepts VBRFailoverPlan or VBRCloudFailoverPlan types.

True

Named

True (ByValue,
ByProperty
Name)

False

Name

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

False

Named

False

False

FailoverPlanObject

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

Accepts VBRFailoverPlanObject or VBRCloudFailoverPlanObject types.

False

Named

False

False

Description

Specifies the new description you want to apply to the failover plan.

False

Named

False

False

PrefailoverCommand

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

False

Named

False

False

PostfailoverCommand

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

False

Named

False

False

EnablePublicIpRule

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

False

Named

False

False

PassThru

Indicates that the command returns the output object to the Windows PowerShell console.

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

VBRTenantFailoverPlan

Example 1

This command adds one more server to the failover plan named "MS Exchange Group Failover".

  1. Create a new failover plan object for the new VM. For details, see New-VBRFailoverPlanObject. Save the object to the $MSExchangeServer03 variable.
  2. Run Get-VBRFailoverPlan to get the failover plan and save it to the '$MSExchangePlan' variable.
  3. Get the VMs (failover plan objects) that are currently in the failover plan. Save the array to the $MSExchangeGroup variable.
  4. Add the new failover plan object to the array.
  5. Run Set-VBRFailoverPlan using the $MSExchangePlan variable and the updated array of the failover plan objects.

$MSExchangeServer03 = Find-VBRViEntity -Name "MS Exchange Server 03"

$MSExchangePlan = Get-VBRFailoverPlan -Name "MS Exchange Group Failover"

$MSExchangeGroup = $MSExchangePlan.FailoverObject

$MSExchangeGroup += $MSExchangeServer03

Set-VBRFailoverPlan -FailoverPlan $MSExchangePlan -FailoverPlanObject $MSExchangeGroup -Description "Failover plan for the mail servers group: UPDATED"

Example 2

[Cloud provider] This command adds a pre-failover script to a tenant failover plan named "ABC Company Failover Plan".

  1. Run Get-VBRFailoverPlan to get the failover plan of the tenant stored in the $tenant variable. Save the failover plan to the $failoverplan variable.
  2. Run Set-VBRFailoverPlan with the $failoverplan variable. Use the -PrefailoverCommand parameter to add the path to the script to the failover plan.

$failoverplan = Get-VBRFailoverPlan -Tenant $tenant -Name "ABC Company Failover Plan"

Set-VBRFailoverPlan -FailoverPlan $failoverplan -PrefailoverCommand "C:\Users\Administrator\TriggerEmailNotification.cmd"

Related Commands

New-VBRFailoverPlanObject