How to retrieve stdout & stderr both from Invoke-SshCommand

Jul 25, 2014 at 9:10 PM
Hello,
I'm running the invoke-sshcommand cmdlet and I can't seem to get both pipes. Invoke-sshcommand seems to return one or the other. If I expect output from stdout only, I get it. If I expect output through stderr, I get it. I have a program that should get output from both pipes but all I get is sdterr. The cmdlet seems to clobber stdout with stderr. How do I get both pipes through invoke-sshcommand?

DLL module is 2013.4.7
psd1 file is 1.0.0.4

Thanks.
Jul 25, 2014 at 11:56 PM
This page is for the library only. Many PowerShell modules use it (including my own). You should check first with the author of the module how he coded the use of the library. Whose PowerShell module are you using and what commands are you trying to run and how? most use sshexec, so a command is ran and the shell is closed so state is lost.
Jul 26, 2014 at 12:24 AM
Darkoperator wrote:
This page is for the library only. Many PowerShell modules use it (including my own). You should check first with the author of the module how he coded the use of the library. Whose PowerShell module are you using and what commands are you trying to run and how? most use sshexec, so a command is ran and the shell is closed so state is lost.
I'm using Renci.sshClient. I will contact them. Sorry.