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

Set-VBOJob

Short Description

Modifies backup job settings.

Syntax

This cmdlet provides 2 parameter sets.

  • For modifying a backup job that will back up only selected items:

Set-VBOJob -Job <VBOJob> [-Name <string>] [-Repository <VBORepository>] [-Description <string>] [-SelectedItems <VBOBackupItem[]>] [-RunJob] [-SchedulePolicy <VBOJobSchedulePolicy>]  [<CommonParameters>]

  • For modifying a backup job that will back up entire organization except for the excluded items:

Set-VBOJob -Job <VBOJob> [-Name <string>] [-Repository <VBORepository>] [-Description <string>] [-EntireOrganization] [-ExcludedItems <VBOBackupItem[]>] [-RunJob] [-SchedulePolicy <VBOJobSchedulePolicy>]  [<CommonParameters>]

  • [OBSOLETE] For modifying a backup job that will back up all mailboxes of Exchange organization. Parameter "AllMailboxes" is obsolete. Use new parameter "EntireOrganization". Parameter "ExcludedMailboxes" is obsolete. Use new parameter "ExcludedItems".

Set-VBOJob -Job <VBOJob> [-Name <string>] [-Repository <VBORepository>] [-Description <string>] [-AllMailboxes] [-ExcludedMailboxes <VBOOrganizationMailbox[]>] [-RunJob] [-SchedulePolicy <VBOJobSchedulePolicy>]  [<CommonParameters>]

  • [OBSOLETE] For modifying a backup job that will back up only selected mailboxes of Exchange organization. Parameter "SelectedMailboxes" is obsolete. Use new parameter "SelectedItems".

Set-VBOJob -Job <VBOJob> [-Name <string>] [-Repository <VBORepository>] [-Description <string>]  [-SelectedMailboxes <VBOOrganizationMailbox[]>] [-RunJob] [-SchedulePolicy <VBOJobSchedulePolicy>]  [<CommonParameters>]

Detailed Description

This cmdlet modifies settings of a backup job.

To modify settings, enter the corresponding parameters with new values. The parameters that you omit will remain unchanged.

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

Job

Specifies the backup job that you want to modify.

True

Named

True (ByValue)

False

Name

Specifies the name you want to use for the backup job.

False

Named

False

False

Repository

Specifies the backup repository. Veeam Backup for Microsoft Office 365 will store organization backups in this repository.

False

Named

False

False

Description

Specifies the description of the backup job.

False

Named

False

False

AllMailboxes

OBSOLETE: Parameter "AllMailboxes" is obsolete. Use new parameter "EntireOrganization".

Indicates that the backup job will back up all mailboxes of Exchange organization.

False

Named

False

False

Excluded
Mailboxes

OBSOLETE: Parameter "ExcludedMailboxes" is obsolete. Use new parameter "ExcludedItems".

Specifies mailboxes that the backup job will not back up.

If you configured your backup job to back up all Exchange organization mailboxes, the cmdlet will exclude these mailboxes from processing.

False

Named

False

False

Selected
Mailboxes

OBSOLETE: Parameter "SelectedMailboxes" is obsolete. Use new parameter "SelectedItems".

Specifies mailboxes that the backup job will back up.

False

Named

False

False

RunJob

Indicates that the backup job will run right after its creation. Otherwise, the backup job will be created with Stopped status.

False

Named

False

False

SchedulePolicy

Specifies the backup job schedule settings.

For more information on how to create the backup job schedule settings, see New-VBOJobSchedulePolicy.

False

Named

False

False

SelectedItems

Specifies items that the backup job will backup.

True

Named

False

False

EntireOrganization

Indicates that the job will backup all items of the organization.

False

Named

False

False

ExcludedItems

Specifies items that the backup job will not back up.

If you configured your backup job to back up all organization items, the cmdlet will exclude these items from processing.

Adding items from SelectedItems as ExcludedItems will result in an error.

False

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 modify the settings of a backup job:

  • Select items for the backup job
  • Change the repository, where Veeam Backup for Microsoft Office 365 will store items backups

You will need to perform the following steps:

  1. Run Get-VBOJob to get the backup job you want to change. Save the result to the $job variable.
  2. Run Get-VBORepository to specify the backup repository where Veeam Backup for Microsoft Office 365 will store item backups. Save the result to the $repository variable.
  3. Run Get-VBOOrganizationUser to get an organization user. In this case we will use it as an excluded item. Save the result to the $excludedUser variable.
  4. Run New-VBOBackupItem to select the items for the backup job. Save each selected item to a separate variable: $item1, $item2, etc.
  5. Run Set-VBOJob with the $job, $repository and the list of variables that represent items.

PS C:\PS> $job = Get-VBOJob -Name "Critical Backup"

PS C:\PS> $repository = Get-VBORepository -Name "ABC Backup Files"

PS C:\PS> $excludedUser = Get-VBOOrganizationUser -Organization $org -Name "UserAlpha"

PS C:\PS> $item1 = New-VBOBackupItem -Organization $org -Mailbox

PS C:\PS> Set-VBOJob -Job $job -Repository $repository -SelectedItems $item1

Example 2

This example shows how to exclude items from the scope of a backup job that backs up an entire organization.

You will need to perform the following steps:

  1. Run Get-VBOJob to get the backup job you want to change. Save the result to the $job variable.
  2. Run Get-VBORepository to specify the backup repository where Veeam Backup for Microsoft Office 365 will store item backups. Save the result to the $repository variable.
  3. Run Get-VBOOrganization to get an organization whose items are backed up by the backup job. Save the result to the $org variable.
  4. Run Get-VBOOrganizationUser to get an organization user. In this case we will use it as an excluded item. Save the result to the $excludedUser variable.
  5. Run Set-VBOJob with the $job, $repository and the list of variables that represent excluded items.

PS C:\PS> $job = Get-VBOJob -Name "Critical Backup"

PS C:\PS> $repository = Get-VBORepository -Name "ABC Backup Files"

PS C:\PS> $org = Get-VBOOrganization -Name "ABC Company"

PS C:\PS> $excludedUser = Get-VBOOrganizationUser -Organization $org -Name "UserAlpha"

PS C:\PS> Set-VBOJob -Job $job -Repository $repository -EntireOrganization -ExcludedItems $excludedUser

Example 3

This example shows how set new schedule settings for the backup job:

  • The job will run on workdays at 3 PM
  • The job will be terminated if it runs longer that 10 minutes
  • Veeam Backup for Microsoft Office 365 will not perform retry attempts if the job fails

You will need to perform the following steps:

  1. Run Get-VBOJob to get the backup job that you want to change. Save the result to the $job variable.
  2. Run New-VBOJobSchedulePolicy to set a new backup job schedule. Save the result to the $schedule variable.
  3. Run Set-VBOJob with the $job and $schedule variables.

PS C:\PS> $job = Get-VBOJob -Name "Veeam Backup"

PS C:\PS> $schedule = New-VBOJobSchedulePolicy -Type Daily -DailyTime 15:00:00 -DailyType Workdays -TerminationEnabled -TerminationInterval Minutes10 -RetryEnabled:$False

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

Related Commands

Veeam Large Logo

User Guide

RESTful API Reference

PowerShell Reference