Open oribesser opened 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
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
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?