Skip to content

Latest commit

 

History

History
26 lines (22 loc) · 434 Bytes

PowerShell Jobs.md

File metadata and controls

26 lines (22 loc) · 434 Bytes

Executing script as job using -AsJob

Get-WMIObject Win32_OperatingSystem -AsJob
Some-Workflow -AsJob

Executing script as Job using Start-Job

Start-Job { Get-WMIObject Win32_OperatingSystem }
Start-Job Some-Workflow

Check status of all Jobs

Get-Job

Get status of a specific Job

$JobOutput = Receive-Job -Id 1

Remove Job

Remove-Job -Id 1