Defines backup window settings for a job.
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus, Veeam Universal License
New-VBRBackupWindowOptions [-Enabled] [-FromDay <DayOfWeek>] [-FromHour <Int32>] [-ToDay <DayOfWeek>] [-ToHour <Int32>] [<CommonParameters>]
This cmdlet creates the VBRBackupWindowOptions object. This object contains backup window settings for a job. These settings define a time interval within which the job must be completed. 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 apply backup window settings to the backup, replication or backup copy job.
Run the New-VBRBackupToTapeScheduleOption cmdlet to apply backup window settings to a backup to tape job.
Specifies the day of week on which the backup window opens.
Specifies an hour when the backup window opens.
Specifies the day of week on which the backup window closes.
Specifies an hour when the backup window closes.
NOTE: The backup windows closes at the end of an hour that you specify in the ToHour parameter.
For example, if you specify the 22 value for the ToHour parameter, the backup window will end at 22:59.
Defines that the cmdlet will enable the backup window.
If you provide this parameter, the period that you set for a backup window will specify the time when the job is allowed to run.
Otherwise, the period that you set for a backup window will specify the time when the job is not allowed to run.
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.
Example 1. Defining Backup Window Settings
This command defines backup window settings that will allow a job to run from 20:00 to 22:59 every day from Monday to Friday.
Example 2. Defining Backup Window Settings for Specific Period of Time
This command defines backup window settings that will allow a job to run during the following period of time:
Example 3. Defining Period of Time When Job must not Run
This command defines backup window settings for a job. These settings specify the period of time when the job must not run. According to these setting the job is not allowed to run from 08:00 to 20:59 on weekdays.
Example 4. Modifying Schedule Settings of Existing Job
This example shows how to modify schedule settings of an existing job. The job is allowed to run from 07:00 to 19:59 every day from Sunday to Monday except for Saturday.
Perform the following steps:
Save the result to the $windowoptions variable.