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 throttling on the jobs.
MIT License
542 stars 87 forks source link

Verbose stream from remote runspaces (Invoke-Command) is not catched #137

Open oribesser opened 7 years ago

oribesser commented 7 years ago

Hi, I'll just outline the behavior instead of describing the situation..

Executing: Start-RSJob -ScriptBlock {Write-Verbose 'aaa' -Verbose} | Receive-RSJob results in: VERBOSE: aaa

Executing: Invoke-Command -ComputerName name -ScriptBlock {Write-Verbose 'aaa' -Verbose} also results in: VERBOSE: aaa

But executing: Start-RSJob -ScriptBlock {Invoke-Command -ComputerName name -ScriptBlock {Write-Verbose 'aaa' -Verbose}} | Receive-RSJob does not produce any result, I have checked the 'Verbose' property of Get-RsJob and it is indeed empty.

Is this an expected behavior?

MVKozlov commented 7 years ago

afaik, remote commands does not fill Verbose streams, it just Write-Verbose right to host :( so its Powershell limitation.

I report similar problem here https://github.com/PowerShell/PowerShell/issues/3354

oribesser commented 7 years ago

bummer.. it limits my logging capabilities from remote commands. I posted it also on Powershell uservoice https://windowsserver.uservoice.com/forums/301869-powershell/suggestions/18688315-verbose-stream-is-not-properly-redirected-between