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 parameter sets that allow you to:

    • 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 the entire organization except for the excluded items.

    Set-VBOJob -Job <VBOJob> [-Name <string>] [-Repository <VBORepository>] [-Description <string>][-EntireOrganization] [-ExcludedItems <VBOBackupItem[]>] [-RunJob] [-SchedulePolicy <VBOJobSchedulePolicy>][-SelectedOneDriveFolders <string[]>] [-ExcludedOneDriveFolders <string[]>]  [<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

    Type

    Required

    Position

    Accept Pipeline Input

    Accept Wildcard Characters

    Job

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

    Accepts the VBOJob object. To get this object, run the Get-VBOJob 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

    False

    Named

    False

    False

    Repository

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

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

    False

    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

    SelectedItems

    Specifies objects that a job will back up.

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

    False

    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

    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.

    VBOBackupItem[]

    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

    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

    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

    <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

    Set-VBOJobExample 1. Modifying Repository of 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"

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

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

    Set-VBOJob -Job $job -Repository $repository -SelectedItems $item1

    Perform the following steps:

    1. Run the Get-VBOJob cmdlet. Specify the Name parameter value. Save the result to the $job variable.
    2. Run the Get-VBORepository cmdlet. Specify the Name parameter value. Save the result to the $repository variable.
    3. Run the Get-VBOOrganization cmdlet. Specify the Name parameter value. Save the result to the $org variable.
    4. 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.
    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 Set-VBOJob cmdlet. Specify the following settings:
    • Set the $job variable as the Job parameter value.
    • Set the $repository as the Repository parameter value.
    • Set the $item1 variable as the SelectedItems parameter value.

    Set-VBOJobExample 2. Excluding Objects from Entire Organization Job

    This example shows how to exclude objects from a job that backs up an entire organization.

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

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

    $excludedUser = Get-VBOBackupItem -Job $job -Name "JohnDoe"

    Set-VBOJob -Job $job -Repository $repository -EntireOrganization -ExcludedItems $excludedUser

    Perform the following steps:

    1. Run the Get-VBOJob cmdlet. Specify the Name parameter value. Save the result to the $job variable.
    2. Run the Get-VBORepository cmdlet. Specify the Name parameter value. Save the result to the $repository variable.
    3. Run the Get-VBOBackupItem cmdlet. Set the $job variable as the Job parameter value. Specify the Name parameter value. Save the result to the $excludedUser variable.
    1. Run the Set-VBOJob cmdlet. Specify the following settings:
    • Set the $job variable as the Job parameter value.
    • Set the $repository as the Repository parameter value.
    • Specify the EntireOrganization parameter.
    • Set the $excludedUser variable as the ExcludedItems parameter value.

    Set-VBOJobExample 3. Setting New Schedule for Job

    This example shows how to set new schedule settings for a backup job. The job will run wit the following settings:

    • The job will run on workdays at 3 PM.
    • The job will be terminated if it runs longer than 10 minutes.
    • Veeam Backup for Microsoft Office 365 will not perform any retry attempts if the job fails.

    $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

    Perform the following steps:

    1. Run the Get-VBOJob cmdlet. Specify the Name parameter value. Save the result to the $job variable.
    2. Run the New-VBOJobSchedulePolicy cmdlet. Specify the necessary parameters. Save the result to the $schedule variable.
    3. Run the Set-VBOJob cmdlet. Set the $job as the Job parameter value. Set the $schedule as the SchedulePolicy parameter value.

    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.