Help Center
Choose product document...
Veeam Backup & Replication 9.5
PowerShell Reference

New-VBRJobOptions

Short Description

Creates new job options.

Applies to

Platform: VMware, Hyper-V

Product Edition: Standard, Enterprise, Enterprise Plus

Syntax

This cmdlet provides 3 parameter sets.

  • For editing all job options:

New-VBRJobOptions  [<CommonParameters>]

  • For editing backup jobs options:

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

  • For editing replication jobs options:

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

Detailed Description

This cmdlet returns default job settings. You can edit any setting that you want to apply to a job.

Run Set-VBRJobOptions to apply the modified options to a job.

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

ForBackupJob

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

False

Named

False

False

ForReplicaJob

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

False

Named

False

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information about common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.

Example

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.

PS C:\PS> $retention = New-VBRJobOptions -ForBackupJob

PS C:\PS> $retention.BackupStorageOptions.RetainCycles = 7

PS C:\PS> $job = Get-VBRJob -Name "ABC Backup"

PS C:\PS> Set-VBRJobOptions -Job $job -Options $retention

Related commands

Get-VBRJob

Set-VBRJobOptions

Veeam Large Logo

User Guide for VMware vSphere

User Guide for Microsoft Hyper-V

Enterprise Manager User Guide

Veeam Cloud Connect Guide

Veeam Backup Explorers User Guide

PowerShell Reference

RESTful API Reference

Veeam Backup FREE Edition User Guide

Veeam Backup for Microsoft Office 365

Veeam ONE Documentation

Veeam Agent for Windows Documentation

Veeam Agent for Linux Documentation

Veeam Management Pack Documentation