Help Center
Choose product document...
Veeam Backup for Microsoft Office 365 2.0
PowerShell Reference

Set-VBOBackupWindowSettings

Short Description

Modifies backup window settings.

Syntax

Set-VBOBackupWindowSettings -Settings <VBOBackupWindow> -FromDay <DayOfWeek> {Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday} -FromHour <int> -ToDay <DayOfWeek> {Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday} -ToHour <int> -Enabled  [<CommonParameters>]

Detailed Description

This cmdlet modifies backup window settings.

You can use a backup window object when creating or modifying backup job schedule settings. For more information on how to create backup job schedule settings, see New-VBOJobSchedulePolicy.

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

Settings

Specifies the backup window  you want to modify.

True

Named

False

False

FromDay

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

True

Named

False

False

FromHour

Specifies the hour on which the backup window opens.

True

Named

False

False

ToDay

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

True

Named

False

False

ToHour

Specifies the hour on which the backup window ends.

True

Named

False

False

Enabled

Indicates that the cmdlet will create a backup window with allowed backup hours.

If this parameter is set to False, the cmdlet will create a backup window with prohibited backup hours.

True

Named

False

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information about common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.

Example 1

This example shows how to add allowed backup hours to the backup window of the existing job.

You will need to perform the following steps:

  1. Get the backup window of the existing job.
  • Run Get-VBOJob to get a backup job whose backup window settings you want to modify. Save the result to the $job variable.
  • Get the job schedule settings. Use the SchedulePolicy property of the job object saved to the $job variable. Save the result to the $schedule variable.
  • Get the backup window. Use the BackupWindow property of the schedule policy object saved to the $schedule variable. Save the result to the $awindow variable.
  1. Run Set-VBOBackupWindowSettings with the $awindow variable to modify the backup window settings. Save the result to the $newawindow variable.
  2. Apply the new backup window settings to the backup job schedule.
  • Run Set-VBOJobSchedulePolicy with the $schedule and $newwidow variables to modify the job schedule settings. Save the result to the $newschedule variable.
  • Run Set-VBOJob with the $job and $newschedule variables.

PS C:\PS> $job = Get-VBOJob -Name "ABC: Sales"

PS C:\PS> $schedule = $job.SchedulePolicy

PS C:\PS> $awindow = $schedule.BackupWindow

PS C:\PS> $newawindow = Set-VBOBackupWindowSettings -Settings $awindow -FromDay Saturday -FromHour 8 -ToDay Saturday -ToHour 17 -Enabled

PS C:\PS> $newschedule = Set-VBOJobSchedulePolicy -Policy $schedule -BackupWindowEnabled -BackupWindow $newawindow

PS C:\PS> Set-VBOJob -Job $job -SchedulePolicy $newschedule

Example 2

This example shows how to add prohibited backup hours to the backup window of the existing job.

You will need to perform the following steps:

  1. Get the backup window of the existing job.
  • Run Get-VBOJob to get a backup job whose backup window settings you want to modify. Save the result to the $job variable.
  • Get the job schedule settings. Use the SchedulePolicy property of the job object saved to the $job variable. Save the result to the $schedule variable.
  • Get the backup window. Use the BackupWindow property of the schedule policy object saved to the $schedule variable. Save the result to the $pwindow variable.
  1. Run Set-VBOBackupWindowSettings with the $pwindow variable to modify the backup window settings. Save the result to the $newpwindow variable.
  2. Apply the new backup window settings to the backup job schedule.
  • Run Set-VBOJobSchedulePolicy with the $schedule and $newpwidow variables to modify the job schedule settings. Save the result to the $newschedule variable.
  • Run Set-VBOJob with the $job and $newschedule variables.

PS C:\PS> $job = Get-VBOJob -Name "ABC: Sales"

PS C:\PS> $schedule = $job.SchedulePolicy

PS C:\PS> $pwindow = $schedule.BackupWindow

PS C:\PS> $newpwindow = Set-VBOBackupWindowSettings -Settings $pwindow -FromDay Monday -FromHour 12 -ToDay Monday -ToHour 13 -Enabled

PS C:\PS> $newschedule = Set-VBOJobSchedulePolicy -Policy $schedule -BackupWindowEnabled -BackupWindow $newpwindow

PS C:\PS> Set-VBOJob -Job $job -SchedulePolicy $newschedule

Related Commands

Veeam Large Logo

User Guide

RESTful API Reference

PowerShell Reference