--- title: "Set-VBOJob" description: "This cmdlet modifies settings of a backup job. To modify settings, you need to enter the necessary parameters with new values. The parameters that you omit will remain unchanged." canonical: "https://helpcenter.veeam.com/docs/vbo365/powershell/set-vbojob.html" breadcrumb: "PowerShell Reference > Veeam Backup for Microsoft 365 PowerShell Reference > Data Backup > Backup Jobs > Set-VBOJob" dateModified: "2026-08-21" --- # Set-VBOJob ## Short Description Modifies settings of a backup job. ## Syntax This cmdlet provides the following parameter sets: ## Detailed Description This cmdlet modifies settings of a backup job. To modify settings, you need to enter the necessary parameters with new values. The parameters that you omit will remain unchanged. ## Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

Description

Specifies a description of the backup job. The cmdlet will replace the current description with the specified description.

String

False

Named

False

EnableExcludedOneDriveFolders

Defines that a backup job will not back up the specified excluded OneDrive folders.

Default: False

SwitchParameter

False

Named

False

EnableSelectedOneDriveFolders

Defines that a backup job will back up the specified selected OneDrive folders.

Default: False

SwitchParameter

False

Named

False

EntireOrganization

Defines that a 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.

Default: False

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

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.

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

VBOBackupItem[]

False

Named

False

ExcludedOneDriveFolders

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

String[]

False

Named

False

Job

Specifies a backup job. The cmdlet will modify this job.

Accepts the VBOJob object.

To get this object, run the Get-VBOJob cmdlet.

VBOJob

True

Named

True (ByValue)

Name

Specifies a new name of a backup job. The cmdlet will replace the current name with the specified name.

String

False

Named

False

Repository

Specifies a backup repository. Veeam Backup for Microsoft 365 will store backups created by a backup job you modify on this repository. The cmdlet will replace the current backup repository with the specified backup repository.

Accepts the VBORepository object.

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

VBORepository

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

SchedulePolicy

Specifies schedule settings for a backup job.

Accepts the VBOJobSchedulePolicy object.

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

VBOJobSchedulePolicy

False

Named

False

SelectedItems

Specifies an array of objects that a job will back up.

Accepts the VBOBackupItem[] object.

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

VBOBackupItem[]

False

Named

False

SelectedOneDriveFolders

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

String[]

False

Named

False

`` This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the [About Common Parameters](http://go.microsoft.com/fwlink/p/?LinkID=113216) section of Microsoft Learn. ## Output Object The cmdlet returns the [`VBOJob`](vbojob.md) object that contains settings for a backup job. ## Examples ::: example ### Example 1: Modifying Backup Repository and Selected Items for Backup Job This example shows how to modify the following settings of a backup job: - Select items for the backup job. - Change the backup repository. ``` $job = Get-VBOJob -Name "Critical Backup" $repository = Get-VBORepository -Name "ABC Backup Files" $org = Get-VBOOrganization -Name "ABC Company" $User = Get-VBOOrganizationUser -Organization $org -DisplayName "UserAlpha" $item1 = New-VBOBackupItem -User $User -Mailbox Set-VBOJob -Job $job -Repository $repository -SelectedItems $item1 ``` Perform the following steps: 1. Run the [`Get-VBOJob`](get-vbojob.md) cmdlet. Specify the `Name` parameter value. Save the result to the `$job` variable. 2. Run the [`Get-VBORepository`](get-vborepository.md) cmdlet. Specify the `Name` parameter value. Save the result to the `$repository` variable. 3. Run the [`Get-VBOOrganization`](get-vboorganization.md) cmdlet. Specify the `Name` parameter value. Save the result to the `$org` variable. 4. Run the [`Get-VBOOrganizationUser`](get-vboorganizationuser.md) cmdlet. Set the `$org` variable as the `Organization` parameter value. Specify the `DisplayName` parameter value. Save the result to the `$User` variable. 5. Run the [`New-VBOBackupItem`](new-vbobackupitem.md) cmdlet. Set the `$User` variable as the `User` parameter value. Provide the `Mailbox` parameter. Save the result to the `$item1` variable. 6. Run the `Set-VBOJob` cmdlet. Specify the following settings: - Set the `$job` variable as the `Job` parameter value. - Set the `$repository` variable as the `Repository` parameter value. - Set the `$item1` variable as the `SelectedItems` parameter value. ::: ::: example ### Example 2: Excluding Objects from Backup Job This example shows how to exclude objects from a backup job. ``` $job = Get-VBOJob -Name "Critical Backup" $org = Get-VBOOrganization -Name "ABC Company" $User = Get-VBOOrganizationUser -Organization $org -DisplayName "JohnDoe" $excludedItem = New-VBOBackupItem -User $User Set-VBOJob -Job $job -ExcludedItems $excludedItem ``` Perform the following steps: 1. Run the [`Get-VBOJob`](get-vbojob.md) cmdlet. Specify the `Name` parameter value. Save the result to the `$job` variable. 2. Run the [`Get-VBOOrganization`](get-vboorganization.md) cmdlet. Specify the `Name` parameter value. Save the result to the `$org` variable. 3. Run the [`Get-VBOOrganizationUser`](get-vboorganizationuser.md) cmdlet. Set the `$org` variable as the `Organization` parameter value. Specify the `DisplayName` parameter value. Save the result to the `$User` variable. 4. Run the [`New-VBOBackupItem`](new-vbobackupitem.md) cmdlet. Set the `$User` variable as the `User` parameter value. Save the result to the `$excludedItem` variable. 5. Run the `Set-VBOJob` cmdlet. Specify the following settings: - Set the `$job` variable as the `Job` parameter value. - Set the `$excludedItem` variable as the `ExcludedItems` parameter value. ::: ::: example ### Example 3: Setting New Schedule for Backup Job This example shows how to set new schedule settings for a backup job. The job will run with the following settings: - The job will run on workdays at 2:50 PM. - The job will be terminated if it exceeds the specified backup window: the job will be stopped if it is still running from 03:00 PM until 03:59 PM. - Veeam Backup for Microsoft 365 will not perform any retry attempts if the job fails. ``` $job = Get-VBOJob -Name "Veeam Backup" $Window = New-VBOBackupWindowSettings -Enabled:$true -FromDay Monday -ToDay Sunday -FromHour 16 -ToHour 15 $schedule = New-VBOJobSchedulePolicy -Type Daily -DailyTime 14:50:00 -DailyType Workdays -EnableSchedule -RetryEnabled:$false -BackupWindowSettings $Window Set-VBOJob -Job $job -SchedulePolicy $schedule ``` Perform the following steps: 1. Run the [`Get-VBOJob`](get-vbojob.md) cmdlet. Specify the `Name` parameter value. Save the result to the `$job` variable. 2. Run the [`New-VBOBackupWindowSettings`](new-vbobackupwindowsettings.md) cmdlet. Specify the necessary parameters. Save the result to the `$Window` variable. 3. Run the [`New-VBOJobSchedulePolicy`](new-vbojobschedulepolicy.md) cmdlet. Specify the necessary parameters. Save the result to the `$schedule` variable. 4. Run the `Set-VBOJob` cmdlet. Set the `$job` variable as the `Job` parameter value. Set the `$schedule` variable as the `SchedulePolicy` parameter value. ::: ::: example ### Example 4: Defining OneDrive Folders that Backup Job will Back Up This example shows how to specify an array of OneDrive folders that a backup job will back up. ``` $job = Get-VBOJob -Name "Veeam Backup" Set-VBOJob -Job $job -SelectedOneDriveFolders @("SelectedFolder1","SelectedFolder2") -EnableSelectedOneDriveFolders ``` Perform the following steps: 1. Run the [`Get-VBOJob`](get-vbojob.md) cmdlet. Specify the `Name` parameter value. Save the result to the `$job` variable. 2. Run the `Set-VBOJob` cmdlet. Specify the following settings: - Set the `$job` variable as the `Job` parameter value. - Provide an array of OneDrive folders that you want to back up as the `SelectedOneDriveFolders` parameter value. - Provide the `EnableSelectedOneDriveFolders` parameter. ::: ::: example ### Example 5: Defining OneDrive Folders to Exclude from Backup Job This example shows how to specify an array of OneDrive folders that a backup job will not back up. ``` $job = Get-VBOJob -Name "Veeam Backup" Set-VBOJob -Job $job -ExcludedOneDriveFolders @("ExcludedFolder1","ExcludedFolder2") -EnableExcludedOneDriveFolders ``` Perform the following steps: 1. Run the [`Get-VBOJob`](get-vbojob.md) cmdlet. Specify the `Name` parameter value. Save the result to the `$job` variable. 2. Run the `Set-VBOJob` cmdlet. Specify the following settings: - Set the `$job` variable as the `Job` parameter value. - Provide an array of OneDrive folders that you do not want to back up as the `ExcludedOneDriveFolders` parameter value. - Provide the `EnableExcludedOneDriveFolders` parameter. ::: ::: example ### Example 6: Modifying Backup Repository and Name for Backup Job This example shows how to change a backup repository and a name for a backup job. ``` $job = Get-VBOJob -Name "Backup" $repository = Get-VBORepository -Name "ABC Backup Files" Set-VBOJob -Job $job -Repository $repository -Name "New Backup" ``` Perform the following steps: 1. Run the [`Get-VBOJob`](get-vbojob.md) cmdlet. Specify the `Name` parameter value. Save the result to the `$job` variable. 2. Run the [`Get-VBORepository`](get-vborepository.md) cmdlet. Specify the `Name` parameter value. Save the result to the `$repository` variable. 3. Run the `Set-VBOJob` cmdlet. Specify the following settings: - Set the `$job` variable as the `Job` parameter value. - Set the `$repository` variable as the `Repository` parameter value. - Specify the `Name` parameter value. ::: ## Related Commands - [`Get-VBOJob`](get-vbojob.md) - [`Get-VBOOrganization`](get-vboorganization.md) - [`Get-VBORepository`](get-vborepository.md) - [`Get-VBOOrganizationUser`](get-vboorganizationuser.md) - [`New-VBOBackupItem`](new-vbobackupitem.md) - [`Get-VBOBackupItem`](get-vbobackupitem.md) - [`New-VBOBackupWindowSettings`](new-vbobackupwindowsettings.md) - [`New-VBOJobSchedulePolicy`](new-vbojobschedulepolicy.md)