Skip to content

mkellerman/Invoke-Job

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

Invoke-Job

Function to control background job processing exposing additional functionalities.

Added functionalities:

  • ImportFunctions
  • Throttle
  • Tmeout
  • PassThru

Example

Start 5 background jobs, throttle 2 jobs in parallel, Output result from Job and use a custom function from current session.

function Invoke-HelloWorld { 
    Write-Warning 'Hello World'
}

(1..5) | Invoke-Job -ScriptBlock { Invoke-HelloWorld; Start-Sleep 2 } -ImportFunctions -Throttle 2 -PassThru

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published