Posh-SSH
Posh-SSH copied to clipboard
Invoke-SSHCommand output not captured on error
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