Stop-DPMJob
Stop-DPMJob
Stops a running DPM job.
Syntax
Parameter Set: CancelDpmJob
Stop-DPMJob [-Job] <Job[]> [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: CancelDpmTask
Stop-DPMJob [-Task] <Task[]> [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Stop-DPMJob cmdlet stops a running job in System Center 2012 – Data Protection Manager (DPM).
Parameters
-Job<Job[]>
Specifies an array of job objects.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
-Task<Task[]>
Specifies an array of task objects.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
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.
Examples
Example 1: Stop all DPM jobs
This example stops all jobs for a protection group.
The first command uses the Get-DPMProtectionGroup cmdlet to retrieve the protection group, and then stores the result in the variable named $PGroup.
The second command uses the Get-DPMJob cmdlet to retrieve the list of running jobs for the protection group, and then stores the result in the variable named $Job.
The third command uses the Stop-DPMJob cmdlet to stop the currently running jobs stored in the variable $Job.
PS C:\> $PGroup = Get-DPMProtectionGroup -DPMServerName "Contoso-DPMServer"
PS C:\> $Job = Get-DPMJob -ProtectionGroup $PGroup -Status InProgress
PS C:\> Stop-DPMJob $Job