---
title: "New-VESQLIRSwitchOverOptions"
description: "Defines the switchover option that you can apply to the instant recovery session of a Microsoft SQL Server database. Product: Veeam Backup & Replication Product Edition: Enterprise, Enterprise Plus, Veeam Universal License This cmdlet provides th"
canonical: "https://helpcenter.veeam.com/docs/vbr/explorers_powershell/new-vesqlirswitchoveroptions.html"
breadcrumb: "Veeam Explorers PowerShell Reference > Veeam Explorers PowerShell Reference > Veeam Explorer for Microsoft SQL Server > New-VESQLIRSwitchOverOptions"
dateModified: "2026-08-18"
---
# New-VESQLIRSwitchOverOptions
## Short Description
Defines the switchover option that you can apply to the instant recovery session of a Microsoft SQL Server database.
**Product**: Veeam Backup & Replication
**Product Edition**: Enterprise, Enterprise Plus, Veeam Universal License
## Syntax
This cmdlet provides the following parameter sets:
-
AutoSwitch
```
New-VESQLIRSwitchOverOptions [-Auto] []
```
-
ManualSwitch
```
New-VESQLIRSwitchOverOptions [-Manual] []
```
-
ScheduledSwitch
```
New-VESQLIRSwitchOverOptions [-Scheduled] -SwitchingTimeUtc []
```
## Detailed Description
This cmdlet creates the [`VESQLIRSwitchOverOptions`](vesqlirswitchoveroptions.md) object that defines a switchover option that you can apply to the instant recovery session of Microsoft SQL Server databases. You can use this option to create a switchover option and define a schedule for a scheduled switchover.
## Parameters
|
Parameter
|
Description
|
Type
|
Required
|
Position
|
Accept Pipeline Input
|
|
Auto
|
Defines that the switchover will be performed in the Auto mode. This option starts switchover immediately after database files are copied and synchronized.
|
SwitchParameter
|
True
|
Named
|
False
|
|
Manual
|
Defines that the switchover will be performed manually at a later time, using the Switch-VESQLIRDatabase cmdlet.
|
SwitchParameter
|
True
|
Named
|
False
|
|
Scheduled
|
Defines that the switchover will be performed in the Scheduled mode. Switchover will be performed at the specified date and time.
|
SwitchParameter
|
True
|
Named
|
False
|
|
SwitchingTimeUtc
|
For the scheduled switchover option. Specifies the date and time in UTC when the switchover must be started.
|
DateTime
|
True
|
Named
|
False
|
``
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.
## Output Object
The cmdlet returns the [`VESQLIRSwitchOverOptions`](vesqlirswitchoveroptions.md) object that contains a switchover option with the defined schedule.
## Examples
::: example
### Example 1. Creating Scheduled Switchover Option
This example shows how to define a scheduled switchover option. The switchover schedule is set to `2026-11-24 13:00:00`.
```
$time = Get-Date -Date "2026-11-24 13:00:00"
$TimeUtc = $time.ToUniversalTime()
$ScheduledSwitch = New-VESQLIRSwitchOverOptions -Scheduled -SwitchingTimeUtc $TimeUtc
```
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. Convert the scheduled time to the UTC format using the `ToUniversalTime()` method. Save the result to the `$TimeUtc` variable.
3. Run the `New-VESQLIRSwitchOverOptions` cmdlet. Provide the `Scheduled` parameter. Set the `$TimeUtc` variable as the `SwitchingTimeUtc` parameter value.
:::
::: example
### Example 2. Defining Automatic Switchover Option
This command defines the auto switchover option. The switchover will run immediately after database files are copied and synchronized.
```
$AutomaticSwitch = New-VESQLIRSwitchOverOptions -Auto
```
:::
::: example
### Example 3. Defining Manual Switchover Option
This command defines a manual switchover option. The switchover will start after you initiate this process manually with the [`Switch-VESQLIRDatabase`](switch-vesqlirdatabase.md) cmdlet.
```
$ManualSwitch = New-VESQLIRSwitchOverOptions -Manual
```
:::
## Related Commands
- [`Set-VESQLIRDatabase`](set-vesqlirdatabase.md)
- [`Restore-VESQLIRDatabase`](restore-vesqlirdatabase.md)
- [`Switch-VESQLIRDatabase`](switch-vesqlirdatabase.md)