Posh-SSH icon indicating copy to clipboard operation
Posh-SSH copied to clipboard

Invoke-SSHCommand output not captured on error

Open Silex opened this issue 9 months ago • 0 comments

Hello,

When Invoke-SSHCommand has an error the results output is empty.

The only way is to use -ShowStandardOutputStream but it uses Write-Host, so capturing that to a variable is tricky

https://github.com/darkoperator/Posh-SSH/blob/master/Posh-SSH/Posh-SSH.psm1#L271-L276

Silex avatar Mar 26 '25 14:03 Silex