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

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

Open
oribesser opened this issue Mar 21, 2017 · 2 comments
Open

Comments

@oribesser
Copy link

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
Copy link
Contributor

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

I report similar problem here PowerShell/PowerShell#3354

@oribesser
Copy link
Author

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

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

No branches or pull requests

3 participants