Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 3.0 » Resume-Job

Resume-Job - Powershell 3.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »

Resume-Job

Short description
Restarts a suspended job

Syntax
Resume-Job [-Id] <Int32[]> [-Confirm] [-WhatIf] [<CommonParameters>]
Resume-Job [-Filter] <Hashtable> [-Confirm] [-WhatIf] [<CommonParameters>]
Resume-Job [-InstanceId] <Guid[]> [-Confirm] [-WhatIf] [<CommonParameters>]
Resume-Job [-Job] <Job[]> [-Confirm] [-WhatIf] [<CommonParameters>]
Resume-Job [-Name] <String[]> [-Confirm] [-WhatIf] [<CommonParameters>]
Resume-Job [-State] <JobState> [-Confirm] [-WhatIf] [<CommonParameters>]
Resume-Job [-Wait] [-Confirm] [-WhatIf] [<CommonParameters>]





Description
The Resume-Job cmdlet resumes a workflow job that was suspended, such as by using the Suspend-Job cmdlet or the about_S
uspend-Workflow activity. When a workflow job is resumed, the job engine reconstructs the state, metadata, and output f
rom saved resources, such as checkpoints, so the job is restarted without any loss of state or data. The job state is c
hanged from Suspended to Running.


Use the parameters of Resume-Job to select jobs by name, ID, instance ID or pipe a job object, such as one returned by 
the Get-Job cmdlet, to Resume-Job. You can also use a property filter to select a job to be resumed.


By default, Resume-Job returns immediately, even though all jobs might not yet be resumed. To suppress the command prom
pt until all specified jobs are resumed, use the Wait parameter.


The Resume-Job cmdlet works only on custom job types, such as workflow jobs. It does not work on standard background jo
bs, such as those that are started by using the Start-Job cmdlet. If you submit a job of an unsupported type, Resume-Jo
b generates a terminating error and stops running.


To identify a workflow job, look for a value of PSWorkflowJob in the PSJobTypeName property of the job. To determine wh
ether a particular custom job type supports the Resume-Job cmdlet, see the help topics for the custom job type.


NOTE: Before using a Job cmdlet on a custom job type, import the module that supports the custom job type, either by us
ing the Import-Module cmdlet or getting or using a cmdlet in the module.


This cmdlet is introduced in Windows PowerShell 3.0.