Set-DPMProtectionJobStartTime
Set-DPMProtectionJobStartTime
Sets the start time of a protection job.
Syntax
Parameter Set: Edit
Set-DPMProtectionJobStartTime [-ProtectionGroup] <ProtectionGroup> [-JobType] <ProtectionJobType> [-StartTime] <DateTime> [-MaximumDurationInHours] <Int32> [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: OffsetSchedule
Set-DPMProtectionJobStartTime [-ProtectionGroup] <ProtectionGroup> [-CatalogOffset] <Int32> [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: Remove
Set-DPMProtectionJobStartTime [-ProtectionGroup] <ProtectionGroup> [-JobType] <ProtectionJobType> -Remove [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Set-DPMProtectionJobStartTime cmdlet sets the start time of a protection job. The only type of protection job that is currently available is consistency check. Use the Remove parameter to stop a protection job.
Parameters
-CatalogOffset<Int32>
Specifies the number of minutes, after the first scheduled recovery point creation time of the SharePoint farm, that DPM creates the catalog.
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-JobType<ProtectionJobType>
Specifies the type of job for which options are being set. The only valid value for this parameter is ConsistencyCheck.
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-MaximumDurationInHours<Int32>
Specify the maximum number of hours that DPM can run a job.
Aliases |
none |
Required? |
true |
Position? |
4 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-PassThru
Indicates that the cmdlet generates output. By default, this cmdlet does not generate output. You can use the PassThru parameter in order to use the cmdlet in a pipeline.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ProtectionGroup<ProtectionGroup>
Specifies a ProtectionGroup object. To obtain a ProtectionGroup object, use the Get-DPMProtectionGroup cmdlet.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
-Remove
Indicates that DPM stops the protection job.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-StartTime<DateTime>
Specifies a start time for the protection job.
Aliases |
none |
Required? |
true |
Position? |
3 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Confirm
Prompts you for confirmation before running the cmdlet.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
- ProtectionGroup
Notes
- For more information, type "
Get-Help Get-ProtectionJobStartTime -detailed
".
Examples
Example 1: Schedule a consistency check on a protection group
This example schedules a consistency check to run on a protection group every day.
The first command gets the protection group on the DPM server named DPMServer02 and stores the results in the $Pg variable.
The second command makes the protection group stored in the $Pg variable modifiable, and stores the result in the $Mpg variable.
The third command sets the start time of the protection job stored in the $Mpg variable. The command schedules for a consistency check to run on the protection group at 2 a.m. every day.
The fourth command uses the Set-DPMProtectionGroup cmdlet to save the action that you performed on the protection group.
PS C:\> $Pg = Get-DPMProtectionGroup -DPMServerName "DPMServer02"
PS C:\> $Mpg = Get-DPMModifiableProtectionGroup -ProtectionGroup $Pg
PS C:\> Set-DPMProtectionJobStartTime -ProtectionGroup -JobType ConsistencyCheck -StartTime 02:00
PS C:\> Set-DPMProtectionGroup $Mpg
Related topics
Get-ProtectionGroup
Get-ModifiableProtectionGroup
Set-ProtectionGroup