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

New-VBRBackupWindowOptions

Short Description

Defines backup window settings for a job.

Applies to

Platform: VMware, Hyper-V

Product Edition: Standard, Enterprise, Enterprise Plus

Syntax

New-VBRBackupWindowOptions [-FromDay <DayOfWeek>] [-FromHour <Int32>] [-ToDay <DayOfWeek>] [-ToHour <Int32>] [-Enabled] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description

This cmdlet creates the VBRBackupWindowOptions object that contains backup window settings for a job. You can apply these settings to a job.

For more information on the backup windows option, see the Backup Window section in the User Guide for VMware vSphere.

Run the Set-VBRJobSchedule cmdlet to define backup window settings for the backup, replication or backup copy job.

Run the New-VBRBackupToTapeScheduleOption cmdlet to define backup window settings for a backup to tape job.

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

FromDay

Specifies the day of week on which the backup window opens.

Default: Sunday.

False

Named

False

False

FromHour

Specifies the hour on which the backup window opens.

Default: 0.

False

Named

False

False

ToDay

Specifies the day of week on which the backup window ends.

Default: Saturday.

False

Named

False

False

ToHour

Specifies the hour on which the backup window ends.

Default: 23.

False

Named

False

False

Enabled

Indicates that the backup window is enabled.

False

Named

True (ByValue,
ByProperty
Name)

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

None.

Example 1

This command creates a backup window object that will allow a job to run during the following period of time:

  • From 10:00 PM to 10:59 PM on Friday
  • From 10:00 PM to 10:59 on Sunday

$windowoptions = New-VBRBackupWindowOptions -FromDay Friday -FromHour 22 -ToDay Sunday -ToHour 22 -Enabled

Example 2

This example shows how to modify a schedule of an existing job. The job will run from 19:00 PM to 07:00 AM every day from Sunday to Monday except for Saturday.

  1. Run New-VBRBackupWindowOptions cmdlet to create a backup window object. Save the result to the $windowoptions variable.
  2. Run Get-VBRJob to get the job that you want to modify. Save the result to the $job variable.
  3. Run Set-VBRJobSchedule with the $windowoptions and $job variables.

$windowoptions = New-VBRBackupWindowOptions -FromDay Friday -FromHour 19 -ToDay Monday -ToHour 07 -Enabled

$job = Get-VBRJob -Name "SQL Backup Job"

Set-VBRJobSchedule -Job $job -Periodicaly -FullPeriod 6 -PeriodicallyKind Hours -PeriodicallySchedule $windowoptions

Related Commands

New-VBRBackupWindowOptions

Get-VBRJob

Veeam Large Logo

User Guide for VMware vSphere

User Guide for Microsoft Hyper-V

Enterprise Manager User Guide

Veeam Cloud Connect Guide

Veeam Agent Management Guide

Veeam Explorers User Guide

Backup and Restore of SQL Server Databases

Veeam Plug-ins for Enterprise Applications

PowerShell Reference

Veeam Explorers PowerShell Reference

RESTful API Reference

Required Permissions

Veeam Availability for Nutanix AHV

Veeam Backup for Microsoft Office 365 Documentation

Veeam ONE Documentation

Veeam Agent for Windows Documentation

Veeam Agent for Linux Documentation

Veeam Management Pack Documentation