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 | Accept |
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.
This example shows how to define the retention policy for a backup job.
You will need to perform the following steps:
- Run New-VBRJobOptions to get the object with the default backup job settings. Save the result to the $retention variable.
- Edit the backup storage settings. Use the RetainCycles parameter of the BackupStorageOptions object to specify the number of restore points.
- Run Get-VBRJob to get the job to which you want to apply the retention policy. Save the result to the $job variable.
- 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