--- title: "Set-VEPSQLInstanceInstantRecovery" description: "Modifies switchover settings for a specified PostgreSQL instance. Product: Veeam Backup & Replication Product Edition: Enterprise, Enterprise Plus, Veeam Universal License This cmdlet allows you to modify the switchover settings for a specified P" canonical: "https://helpcenter.veeam.com/docs/vbr/explorers_powershell/set-vepsqlinstanceinstantrecovery.html" breadcrumb: "Veeam Explorers PowerShell Reference > Veeam Explorers PowerShell Reference > Veeam Explorer for PostgreSQL > Set-VEPSQLInstanceInstantRecovery" dateModified: "2026-08-18" --- # Set-VEPSQLInstanceInstantRecovery ## Short Description Modifies switchover settings for a specified PostgreSQL instance. **Product**: Veeam Backup & Replication **Product Edition**: Enterprise, Enterprise Plus, Veeam Universal License ## Syntax ``` Set-VEPSQLInstanceInstantRecovery [-Instance] [-SwitchOverOptions] [] ``` ## Detailed Description This cmdlet allows you to modify the switchover settings for a specified PostgreSQL instance. ::: important You can only modify the switchover settings until the moment switchover is automatically triggered (if the `Auto` or `Scheduled` switchover options are selected). ::: ## Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

Instance

Specifies a published PostgreSQL instance within an instant recovery session.

Accepts the VEPSQLInstanceInstantRecovery object. To get this object, run the Get-VEPSQLInstanceInstantRecovery cmdlet.

VEPSQLInstanceInstantRecovery

True

0

True (ByValue)

SwitchOverOptions

Specifies a new switchover option for the specified PostgreSQL instance.

Accepts the VEPSQLIRSwitchOverOptions object. To create this object, run the New-VEPSQLIRSwitchOverOptions cmdlet.

VEPSQLIRSwitchOverOptions

True

1

True (ByValue)

`` This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the [About Common Parameters](http://go.microsoft.com/fwlink/p/?LinkID=113216) section of Microsoft Docs. ## Examples ::: example ### Setting Scheduled Switchover for PostgreSQL Instance This example shows how to modify the scheduled switchover for the `rhel01:5433` instance. The switchover will be performed in the `Scheduled` mode - on `2026-7-24` at `13:00:00` in the time zone of the backup server. ``` $time = Get-Date -Date "2026-7-24 13:00:00" $TimeUtc = $time.ToUniversalTime() $ScheduledSwitch = New-VEPSQLIRSwitchOverOptions -Scheduled -SwitchingTimeUtc $TimeUtc $IRInstance = Get-VEPSQLInstanceInstantRecovery -InstanceName "rhel01:5433" Set-VEPSQLInstanceInstantRecovery -Instance $IRInstance -SwitchOverOptions $ScheduledSwitch ``` Perform the following steps: 1. Run the [`Get-Date`](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-date?view=powershell-7.6) cmdlet and specify the date and time when the switchover must be performed. Save the result to the `$time` variable. 2. Use the `ToUniversalTime()` method to convert the date and time to the UTC format. Save the result to the `$TimeUtc` variable. 3. Run the [`New-VEPSQLIRSwitchoverOptions`](new-vepsqlirswitchoveroptions.md) cmdlet. Provide the `Scheduled` parameter. Set the `$TimeUtc` variable as the `SwitchingTimeUtc` parameter value. Save the result to the `$ScheduledSwitch` variable. 4. Run the [`Get-VEPSQLInstanceInstantRecovery`](get-vepsqlinstanceinstantrecovery.md) cmdlet. Specify the `InstanceName` parameter value. Save the result to the `$IRInstance` variable. 5. Run the `Set-VEPSQLInstanceInstantRecovery` cmdlet. Set the `$IRInstance` as the `Instance` parameter value. Set the `$ScheduledSwitch` variable as the `SwitchOverOptions` parameter value. ::: ## Related Commands - [`New-VEPSQLIRSwitchOverOptions`](new-vepsqlirswitchoveroptions.md) - [`Get-VEPSQLInstanceInstantRecovery`](get-vepsqlinstanceinstantrecovery.md) - [``Get-Date``](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-date?view=powershell-7.6)