Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start-RSJob outputting full job details #208

Open
apachegit opened this issue Jul 8, 2020 · 1 comment
Open

Start-RSJob outputting full job details #208

apachegit opened this issue Jul 8, 2020 · 1 comment

Comments

@apachegit
Copy link

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.

@MVKozlov
Copy link
Contributor

MVKozlov commented Jul 9, 2020

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants