Skip to content
forked from proxb/PoshRSJob

Provides an alternative to PSjobs with greater performance and less overhead to run commands in the background, freeing up the console and allowing thottling on the jobs.

License

Notifications You must be signed in to change notification settings

rmoreas/PoshRSJob

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PoshRSJob 1.5.7.6

Build status Join the chat at https://gitter.im/proxb/PoshRSJob

Provides an alternative to PSjobs with greater performance and less overhead to run commands in the background, freeing up the console.

####Download and install PoshRSJob using PowerShell PSGet:

Install-Module -Name PoshRSJob

More information and examples here: http://learn-powershell.net/2015/04/19/latest-updates-to-poshrsjob/

Older post with some legacy examples found here: http://learn-powershell.net/2015/03/31/introducing-poshrsjob-as-an-alternative-to-powershell-jobs/

####Examples

$Test = 'test'
$Something = 1..10
1..5|start-rsjob -Name {$_} -ScriptBlock {
        [pscustomobject]@{
            Result=($_*2)
            Test=$Using:Test
            Something=$Using:Something
        }
}            
Get-RSjob | Receive-RSJob

alt tag

####This shows the streaming aspect with Wait-RSJob

1..10|Start-RSJob {
    if (1 -BAND $_){
        "First ($_)"
    }Else{
        Start-sleep -seconds 2
        "Last ($_)"
    }
}|Wait-RSJob|Receive-RSJob|ForEach{"I am $($_)"}

alt tag

####Nano Support for PoshRSJob alt tag

About

Provides an alternative to PSjobs with greater performance and less overhead to run commands in the background, freeing up the console and allowing thottling on the jobs.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PowerShell 98.0%
  • C# 2.0%