This is an archive version of the document. To get the most up-to-date information, see the current version.

Set-VBOJob

In this article

    Short Description

    Modifies backup job settings.

    Syntax

    This cmdlet provides the following parameter sets.

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

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

    • Modify 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

    SelectedItems

    Specifies items that the backup job will backup.

    True

    Named

    False

    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

    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

    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

    SelectedOneDriveFolders

    Specifies OneDrive folders that the backup job will back up.

    False

    Named

    False

    False

    ExcludedOneDriveFolders

    Specifies OneDrive folders that the backup job will not back up.

    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

    <CommonParameters>

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

    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 modify. 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.
    5. Run Set-VBOJob with the $job, $repository and the list of variables that represent items.

    $job = Get-VBOJob -Name "Critical Backup"

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

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

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

    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.

    $job = Get-VBOJob -Name "Critical Backup"

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

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

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

    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.

    $job = Get-VBOJob -Name "Veeam Backup"

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

    Set-VBOJob -Job $job -SchedulePolicy $schedule

    Related Commands

    I want to report a typo

    There is a misspelling right here:

     

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