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

Set-VBRFailoverPlan

Short Description

Modifies a selected failover plan or cloud failover plan.

Applies to

Platform: VMware, Hyper-V

Product Edition: Enterprise, Enterprise Plus

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 enter the corresponding parameters with new values. 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 (by Value
FromPipeline,
ValueFromPipeline
ByPropertyName)

False

Name

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

False

Named

False

False

Failover
Plan
Object

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

Enable
Public
IpRule

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 about common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.

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.

PS C:\PS> $MSExchangeServer03 = Find-VBRViEntity -Name "MS Exchange Server 03"

PS C:\PS> $MSExchangePlan = Get-VBRFailoverPlan -Name "MS Exchange Group Failover"

PS C:\PS> $MSExchangeGroup = $MSExchangePlan.FailoverObject

PS C:\PS> $MSExchangeGroup += $MSExchangeServer03

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

PS C:\PS> $failoverplan = Get-VBRFailoverPlan -Tenant $tenant -Name "ABC Company Failover Plan"

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

Related Commands

New-VBRFailoverPlanObject

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