Defines backup window settings for a job.
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
New-VBRBackupWindowOptions [-FromDay <DayOfWeek>] [-FromHour <Int32>] [-ToDay <DayOfWeek>] [-ToHour <Int32>] [-Enabled] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]
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.
Specifies the day of week on which the backup window opens.
Specifies the hour on which the backup window opens.
Specifies the day of week on which the backup window ends.
Specifies the hour on which the backup window ends.
Indicates that the backup window is enabled.
This cmdlet supports Microsoft PowerShell common parameters. For more information about common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
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
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.
- Run New-VBRBackupWindowOptions cmdlet to create a backup window object. Save the result to the $windowoptions variable.
- Run Get-VBRJob to get the job that you want to modify. Save the result to the $job variable.
- 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