Stop-DPMJob

Stops DPM jobs.

Syntax

Stop-DPMJob
    [-Job] <Job[]>
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]
Stop-DPMJob
    [-Task] <Task[]>
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Stop-DPMJob cmdlet stops jobs that are running in System Center - Data Protection Manager (DPM).

Examples

Example 1: Stop all DPM jobs

PS C:\>$PGroup = Get-DPMProtectionGroup -DPMServerName "Contoso-DPMServer"
PS C:\> $Jobs = Get-DPMJob -ProtectionGroup $PGroup -Status InProgress
PS C:\> Stop-DPMJob -Job $Jobs

The first command uses the Get-DPMProtectionGroup cmdlet to get the protection group for the server named Contoso-DPMServer. The command stores the group in the $PGroup variable.

The second command uses the Get-DPMJob cmdlet to get the jobs that are running for the protection group. The command stores the jobs in the $Jobs variable.

The third command stops the jobs stored in $Job.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Job

Specifies an array of jobs that this cmdlet stops. To obtain Job objects, use the Get-DPMJob cmdlet.

Type:Job[]
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Task

Specifies an array of task objects.

Type:Task[]
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False