New-VBRJobOptions

Short Description

Creates new job options.

Platform: VMware, Hyper-V

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

Syntax

This cmdlet provides the following parameter sets:

  • AllParameterSets (Default)

    New-VBRJobOptions [<CommonParameters>]

  • ForBackupJob

    New-VBRJobOptions [-ForBackupJob] [<CommonParameters>]

  • ForReplicaJob

    New-VBRJobOptions [-ForReplicaJob] [<CommonParameters>]

Detailed Description

This cmdlet returns the CJobOptions object. This object contains the default settings of the job you want to edit. You can customize any setting that you want to apply to a backup job, replication job or selected VMs.

Run the Set-VBRJobOptionsModifies job settings. cmdlet to apply the modified options to a job.

Parameters

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

ForBackupJob

Defines that the cmdlet will return default settings for backup job.

SwitchParameter

False

Named

False

ForReplicaJob

Defines that the cmdlet will return default settings for replication job.

SwitchParameter

False

Named

False

<CommonParameters>

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

Examples

Defining Retention Policy for Backup Job

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

$retention = New-VBRJobOptions -ForBackupJob

$retention.BackupStorageOptions.RetainCycles = 7

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

Set-VBRJobOptions -Job $job -Options $retention

Perform the following steps:

  1. Run the New-VBRJobOptions cmdlet. Provide the ForBackupJob parameter. Save the result to the $retention variable.
  2. Specify the RetainCycles parameter of the BackupStorageOptions object for the $retention variable.
  3. Run the Get-VBRJobReturns existing jobs. cmdlet. Specify the Name parameter value. Save the result to the $job variable.
  4. Run the Set-VBRJobOptionsModifies job settings. cmdlet. Set the $job variable as the Job parameter value. Set the $retention variable as the Options parameter value.

Page updated 2026-08-19

Page content applies to build 13.1.1.18