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

Add-VBOJob

Short Description

Creates a backup job.

Syntax

This cmdlet provides 2 parameter sets.

  • For creating a backup job that will back up only the selected items on the chosen repository:

Add-VBOJob -Organization <VBOOrganization> -Name <String> -Repository <VBORepository> -SelectedItems <VBOBackupItem[]> [-ExcludedItems <VBOBackupItem[]>] [-Description <String>] [-SchedulePolicy <VBOJobSchedulePolicy>] [-RunJob] [<CommonParameters>]

  • For creating a backup job that will back up all items of the selected organization except for the specified exclusions:

Add-VBOJob -Organization <VBOOrganization> -Name <string> -Repository <VBORepository> [-EntireOrganization] [-ExcludedItems <VBOBackupItem[]>] [-Description <string>] [-SchedulePolicy <VBOJobSchedulePolicy>] [-RunJob]  [<CommonParameters>]

  • [OBSOLETE] For creating a backup job that will back up all mailboxes of the selected organization on the chosen repository without the excluded mailboxes. Parameter "AllMailboxes" is obsolete. Use new parameter "EntireOrganization". Parameter "ExcludedMailboxes" is obsolete. Use new parameter "ExcludedItems".

Add-VBOJob -Organization <VBOOrganization> -Name <string> -Repository <VBORepository> [-AllMailboxes] [-ExcludedMailboxes <VBOOrganizationMailbox[]>] [-Description <string>] [-SchedulePolicy <VBOJobSchedulePolicy>] [-RunJob]  [<CommonParameters>]

  • [OBSOLETE] For creating a backup job that will backup only the selected mailboxes on the chosen repository. Parameter "SelectedMailboxes" is obsolete. Use new parameter "SelectedItems".

Add-VBOJob -Organization <VBOOrganization> -Name <string> -Repository <VBORepository> -SelectedMailboxes <VBOOrganizationMailbox[]> [-Description <string>] [-RunJob] [-SchedulePolicy <VBOJobSchedulePolicy>]  [<CommonParameters>]

Detailed Description

This cmdlet creates a backup job that will back up Veeam Backup for Microsoft Office 365 items.

Add-VBOJob Note:

Before creating a backup job, make sure you are familiar with the following restrictions:

  • Only one job can back up an entire organization.
  • Several jobs cannot back up same items.

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

Organization

Specifies an organization. The backup job will back up the items of this organization.

True

Named

True (ByValue)

False

Name

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

True

Named

False

False

Repository

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

True

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.

True

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.

True

Named

False

False

RunJob

Indicates that the backup job will run right after its creation. Otherwise, the backup job will be created with a 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.

True

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 create a job that will back up selected backup items of an organization except for the exclusions.

You will need to perform the following steps:

  1. Run Get-VBOOrganization to get an organization. Save the result to the $org variable.
  2. Run Get-VBORepository to specify the backup repository. 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 Add-VBOJob with the $org, $repository, $item1 and $ variables.

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

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> Add-VBOJob -Organization $org -Repository $repository -Name "ABC Backup" -SelectedItems $item1 -ExcludedItems $excludedUser -RunJob

Example 2

This example shows how to create a backup job that will back up entire organization. Items backed up by other jobs will not be included.

You will need to perform the following steps:

  1. Run Get-VBOOrganization to get an organization. Save the result to the $org variable.
  2. Run Get-VBORepository to specify the backup repository. Save the result to the $repository variable.
  3. Run Add-VBOJob with the $org and $repository variables. Use RunJob parameter to start the backup job after its creation.

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

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

PS C:\PS> Add-VBOJob -Name "ABC Backup" -Organization $org -Repository $repository -EntireOrganization -RunJob

Related Commands

Veeam Large Logo

User Guide

RESTful API Reference

PowerShell Reference