Condividi tramite


Restart-DPMJob

Restart-DPMJob

Restarts failed DPM jobs.

Syntax

Parameter Set: Default
Restart-DPMJob [-Job] <Job[]> [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Restart-DPMJob cmdlet restarts failed System Center 2012 – Data Protection Manager (DPM) jobs.

Parameters

-Job<Job[]>

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

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: Restart failed jobs

The first command uses the Get-DPMProtectionGroup cmdlet to retrieve the protection group, and then stores that group in the $PGroup variable.

The second command uses the Get-DPMJob cmdlet to retrieve the failed jobs for the protection group, and then stores them in the $Job variable.

The third command restarts the jobs in $Job.

PS C:\> $PGroup = Get-DPMProtectionGroup -DPMServerName "Contoso-DPMServer"
PS C:\> $Job = Get-DPMJob -ProtectionGroup $PGroup -Status $Failed
PS C:\> Restart-DPMJob -Job $Job

Get-DPMJob

Get-DPMProtectionGroup

Stop-DPMJob