New-VBRJobOptions
Short Description
Sets job options.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
New-VBRJobOptions [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>] -OR- New-VBRJobOptions [-ForBackupJob] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>] -OR- New-VBRJobOptions [-ForReplicaJob] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>] |
Detailed Description
This cmdlet lets you edit job settings of backup jobs, replication jobs or selected VMs.
This cmdlet returns the CJobOptions object containing the default settings of the job you want to edit. You can customize any setting that you want to apply to the job. This object is then used in the Set-VBRJobOptions cmdlet.
You can edit settings of jobs (including vCloud backup jobs), VMs or replication jobs by running this cmdlet with -ForJob, -ForObject or -ForReplicaJob parameters respectively.
Parameters
Parameter | Description | Required | Position | Accept | Accept |
ForBackupJob | Returns the list of the default settings for backup job. | False | Named | False | False |
ForReplicaJob | Returns the list of the 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 command schedules the job named "Backup Job 1" to running every 2 hours.
- The object with scheduling settings is assigned to the $NewScheduleOption variable. The "OptionsPeriodically" parameter is set to and its value is set to 120 (minutes).
- The job to apply the schedule is obtained with Get-VBRJob and assigned to the $job variable.
- The object is then applied to the job by running Set-VBRJobScheduleOptions with these two variables.
PS C:\PS> $NewScheduleOption = New-VBRJobScheduleOptions PS C:\PS> $NewScheduleOption.OptionsPeriodically.Enabled = PS C:\PS> $NewScheduleOption.OptionsPeriodically.FullPeriod = 120 PS C:\PS> $Job = Get-VBRJob -Name "Backup Job 1" PS C:\PS> Set-VBRJobScheduleOptions -Job $Job -Options $NewScheduleOption |