Set-VBRJobOptions

In this article

    Short Description

    Modifies job settings.

    Applies to

    Platform: VMware, Hyper-V

    Product Edition: Standard, Enterprise, Enterprise Plus, Veeam Universal License

    Syntax

    Set-VBRJobOptions [-Job] <CBackupJob[]> [[-Options] <CJobOptions>] [-HighPriority]  [<CommonParameters>]

    Detailed Description

    This cmdlet applies customized settings to a selected job.

    Run New-VBRJobOptions to customize the job settings.

    Parameters

    Parameter

    Description

    Required

    Position

    Accept
    Pipeline
    Input

    Accept
    Wildcard
    Characters

    Job

    Specifies the job you want to edit.

    True

    1

    True (ByValue,
    ByProperty
    Name)

    False

    Options

    Specifies the set of parameters you want to apply to the job.

    False

    2

    False

    False

    HighPriority

    Note: This parameter is available starting from Veeam Backup & Replication 11a (build 11.0.1.1261).

    Defines that Veeam Backup & Replication will prioritize this job higher than other similar jobs and will allocate resources to it in the first place.

    False

    Named

    False

    False

    <CommonParameters>

    This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.

    Example 1

    This example shows how to define the retention policy for a backup job.

    You will need to perform the following steps:

    1. Run New-VBRJobOptions to get the object with the default backup job settings. Save the result to the $retention variable.
    2. Edit the backup storage settings. Use the RetainCycles parameter of the BackupStorageOptions object to specify the number of restore points.
    3. Run Get-VBRJob to get the job to which you want to apply the retention policy. Save the result to the $job variable.
    4. Run Set-VBRJobOptions with the $job and $retention variables to apply the retention policy.

    $retention = New-VBRJobOptions -ForBackupJob

    $retention.BackupStorageOptions.RetainCycles = 7

    $job = Get-VBRJob -Name "ABC Backup"

    Set-VBRJobOptions -Job $job -Options $retention

    Example 2

    This command applies custom settings to the backup job named "Backup Job 01". The job object is obtained with Get-VBRJob and piped down. The object containing the set of customized options is obtained with New-VBRJobOptions and assigned to the $options variable beforehand.

    Get-VBRJob -Name "Backup Job 01" | Set-VBRJobOptions -Options $options

    Example 3

    This command applies custom settings to the backup job represented by the $job variable. The job object is obtained with Get-VBRJob and assigned to the variable beforehand. The object containing the set of customized options is obtained with New-VBRJobOptions and assigned to the $options variable beforehand.

    Set-VBRJobOptions -Job $job -Options $options

    Related Commands

    Get-VBRJob

    New-VBRJobOptions