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 to 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 365 and on-premises Microsoft organizations.
Note |
Before creating a backup job, make sure you are familiar with the following restrictions:
|
Parameters
Parameter | Description | Type | Required | Position | Accept Pipeline Input |
---|---|---|---|---|---|
Organization | Specifies a Microsoft 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) |
Name | Specifies a name of the backup job. The cmdlet will create a backup job with this name. | String | True | Named | False |
Repository | Specifies a backup repository. Veeam Backup for Microsoft 365 will store backups in this repository. Note: If you want to create a backup copy job for this backup job, you must specify object storage repository. | Accepts the VBORepository object. To get this object, run the Get-VBORepository cmdlet. | True | Named | False |
EntireOrganization | Defines that the job will back up 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 back up objects, processed by other backup jobs. Default: False | SwitchParameter | True | Named | 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.
| False | Named | False |
Description | Specifies a description of the 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 |
SchedulePolicy | Specifies schedule settings for a backup job. | Accepts the VBOJobSchedulePolicy object. To create this object, run the New-VBOJobSchedulePolicy cmdlet. | False | Named | 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. Default: False | SwitchParameter | False | Named | False |
SelectedOneDriveFolders | Specifies an array of OneDrive folders that the job will back up. | String[] | False | Named | False |
ExcludedOneDriveFolders | Specifies an array of OneDrive folders that a backup job will not back up. | String[] | False | Named | False |
SelectedItems | Specifies an array of objects that the job will back up. | Accepts the VBOBackupItem[] object.
| True | Named | False |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.
Output Object
The cmdlet returns the VBOJob object that contains settings for a backup job.
Examples
Example 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.
Perform the following steps:
The cmdlet output will contain the following details on the backup job: Organization, Repository, Name, IsEnabled, LastStatus and Description. |
Example 2. Creating Job to Back Up 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.
Perform the following steps:
The cmdlet output will contain the following details on the backup job: Organization, Repository, Name, IsEnabled, LastStatus and Description. |
Related Commands