Veeam Backup for Microsoft Office 365 4.0
PowerShell Reference
Related documents

Add-VBOJob

Short Description

Creates a backup job.

Syntax

This cmdlet provides parameter sets that allow you to:

  • Create a backup job that will back up only selected objects on the specified repository.

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

  • Create a backup job that will back up all objects 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][-SelectedOneDriveFolders <string[]>] [-ExcludedOneDriveFolders <string[]>]  [<CommonParameters>]>]

Detailed Description

This cmdlet creates a backup job that will back up data of your Microsoft Office 365 and on-premises Microsoft organizations.

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 the same items if you schedule them to run within the same period. If their schedules overlap, the items will be backed up by the job that starts earlier.

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

Organization

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

Accepts the VBOOrganization object. To get this object, run the Get-VBOOrganization cmdlet.

True

Named

True (ByValue)

False

Name

Specifies a name of a backup job. The cmdlet will create a backup job with this name.

String

True

Named

False

False

Repository

Specifies a backup repository. Veeam Backup for Microsoft Office 365 will store backups om this repository.

Accepts the VBORepository object. To get this object, run the Get-VBORepository cmdlet.

True

Named

False

False

SelectedItems

Specifies objects that a job will back up.

Accepts the VBOBackupItem[] object. To get this object, run the Get-VBOBackupItem cmdlet.

True

Named

False

False

EntireOrganization

Defines that a job will backup all objects of the organization.

If you provide this parameter, the cmdlet will add all objects of the organization to the backup job. Otherwise, you must select objects that you want to back up.

Note: The backup job will not backup objects, processed by other backup jobs.

SwitchParameter

True

Named

False

False

Description

Specifies a description of a backup job.

The default description contains information on the user who added the backup job, date and time when the backup job was added.

String

False

Named

False

False

RunJob

Defines that a backup job will run right after you create it.

If you provide this parameter, the job will start after you run the script. Otherwise, the cmdlet will create a backup job in the stopped status.

SwitchParameter

False

Named

False

False

SelectedOneDriveFolders

Specifies an array of OneDrive folders that a job will back up.

String[]

False

Named

False

False

ExcludedOneDriveFolders

Specifies an array of OneDrive folders that a backup job will not back up.

String[]

False

Named

False

False

SchedulePolicy

Specifies schedule settings for a backup job.

Accepts the VBOJobSchedulePolicy object. To create this object, run the New-VBOJobSchedulePolicy cmdlet.

False

Named

False

False

ExcludedItems

Specifies an array of objects that the job will not back up.

Note: You cannot exclude objects that have been specified for the SelectedItems parameter.

Accepts the VBOBackupItem[] object. To get this object, run the Get-VBOBackupItem cmdlet.

False

Named

False

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see Microsoft Docs.

Output Object

The cmdlet returns the VBOJob object that contains settings for a backup job.

Examples

Add-VBOJobExample 1. Creating Job to Back up Selected Items

This example shows how to create a job that will back up selected backup items of an organization except for the exclusions.

$org = Get-VBOOrganization -Name "ABC Company"

$repository = Get-VBORepository -Name "ABC Backup Files"

$excludedUser = Get-VBOOrganizationUser -Organization $org -Name "UserAlpha"

$excludedItem = New-VBOBackupItem -Mailbox -User $excludedUser

$item1 = New-VBOBackupItem -Organization $org -Mailbox

Add-VBOJob -Organization $org -Repository $repository -Name "ABC Backup" -SelectedItems $item1 -ExcludedItems $excludedItem -RunJob

Organization       Repository         Name               IsEnabled LastStatus   Description

------------       ----------         ----               --------- ----------   -----------

ABC Company        ABC Backup Files   ABC Backup         True      Stopped

Perform the following steps:

  1. Run the Get-VBOOrganization cmdlet. Specify the Name parameter value. Save the result to the $org variable.
  2. Run the Get-VBORepository cmdlet. Specify the Name parameter value. Save the result to the $repository variable.
  3. Run the Get-VBOOrganizationUser cmdlet. Set the $org variable as the Organization parameter value. Specify the Name parameter value. Save the result to the $excludedUser variable.
  4. Run the New-VBOBackupItem cmdlet. Specify the Mailbox parameter value. Set the $excludedUser variable as the User parameter value. Save the result to the $excludedItem variable.
  5. Run the New-VBOBackupItem cmdlet. Set the $org variable as the Organization parameter value. Specify the Mailbox parameter value. Save the result to the $item1.
  6. Run the Add-VBOJob cmdlet. Specify the following settings:
  • Set the $org variable as the Organization parameter value.
  • Set the $repository as the Repository parameter value.
  • Specify the Name parameter value.
  • Set the $item1 variable as the SelectedItems parameter value.
  • Set the $excludedItem variable as the ExcludedItems parameter value.
  • Provide the RunJob parameter.

The cmdlet output will contain the following details on the backup job. Organization, Repository, Name, IsEnabled, LastStatus and Description.

Add-VBOJobExample 2. Creating Job to Backup Entire Organization

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

$org = Get-VBOOrganization -Name "ABC Company"

$repository = Get-VBORepository -Name "ABC Backup Files"

Add-VBOJob -Name "ABC Backup" -Organization $org -Repository $repository -Description "New Organization" -EntireOrganization -RunJob

Organization       Repository         Name               IsEnabled LastStatus   Description

------------       ----------         ----               --------- ----------   -----------

ABC Company        ABC Backup Files   BackupEntireOrg    True      Stopped      New Organization

Perform the following steps:

  1. Run the Get-VBOOrganization cmdlet. Specify the Name parameter value. Save the result to the $org variable.
  2. Run the Get-VBORepository cmdlet. Specify the Name parameter value. Save the result to the $repository variable.
  3. Run the Add-VBOJob cmdlet. Specify the following settings:
  • Set the $org variable as the Organization parameter value.
  • Set the $repository as the Repository parameter value.
  • Specify the EntireOrganization parameter.
  • Specify the RunJob parameter.

The cmdlet output will contain the following details on the backup job. Organization, Repository, Name, IsEnabled, LastStatus and Description.

Related Commands

This Document Help Center
User GuideRESTful API ReferencePowerShell ReferenceVeeam Explorers User GuideVeeam Explorers PowerShell Reference
I want to report a typo

There is a misspelling right here:

 

I want to let the Veeam Documentation Team know about that.