Powershell: Run multiple jobs in parralel and view streaming results from background jobs

前端 未结 5 949
难免孤独
难免孤独 2020-12-09 17:13

Overview

Looking to call a Powershell script that takes in an argument, runs each job in the background, and shows me the verbose output.

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-09 17:56

    You can get the results by doing something like this after all the jobs have been received:

    $array=@() Get-Job -Name * | where{$array+=$_.ChildJobs.output}

    .ChildJobs.output will have anything that was returned in each job.

提交回复
热议问题