PoshRSJob icon indicating copy to clipboard operation
PoshRSJob copied to clipboard

Start-RSJob outputting full job details

Open apachegit opened this issue 4 years ago • 1 comments

I'm sure this is something stupidly simple, but what would cause the call to Start-RSJob to output the full job details to the screen when it starts a job? I'm using the following loop

   {
      $args=@()
      $Args+=$comp
      start-rsjob -throttle $maxjobs -argumentlist $args -filepath "$mydir\getlogons.ps1"
    }

When I use that in a very simple test script, the call to start-rsjob outputs the expected single line of output. However, when I moved it into my larger script, it outputs the full details of the job, as if I'd piped it through "fl".

I'm running Windows 10 and Powershell 5.1 with the latest PoshRSJob installed.

Can anyone shed light on what I should look for earlier in the larger script that's causing this behavior? I'm new to PoshRSJob, so I'm still climbing the learning curve. Thanks.

apachegit avatar Jul 08 '20 22:07 apachegit

This is not related with a specific module, but with the way the powershell tries to display information on the console

You may use select-object to display only desired properties or assign return value to variable to use it later (this way you do not need to use get-rsjob later)

MVKozlov avatar Jul 09 '20 10:07 MVKozlov