Skip to content

Output received text with PRSP when expecting XML to help troubleshoot - #7168

Merged
Travis Plunk (TravisEz13) merged 1 commit into
PowerShell:masterfrom
SteveL-MSFT:psrp-text
Jun 27, 2018
Merged

Travis Plunk (TravisEz13) merged 1 commit into
PowerShell:masterfrom
SteveL-MSFT:psrp-text

Conversation

@SteveL-MSFT

@SteveL-MSFT Steve Lee (SteveL-MSFT) commented Jun 25, 2018 •

Copy link
Copy Markdown
Member

PR Summary

PSRP currently relies on XML for the transport messages. When using PSRP over SSH, if the target side fails, it sends back a text message. PSRP sees this and doesn't know what to do so it throws
a generic message which makes troubleshooting the issue more difficult. Change here is to throw
the text message which now looks like:

new-pssession : [test-machine] There is an error processing data from the background process. Error reported: Invalid argument '-np', did you mean:.

Previously:

new-pssession : [test-machine] There is an error processing data from the background process. Error reported: Cannot process an element with node type "Text". Only Element and EndElement node types are supported..

Since it's processing one line at a time, not able to get the whole message.

PR Checklist

@TravisEz13
Travis Plunk (TravisEz13) merged commit 057eedd into PowerShell:master Jun 27, 2018
@SteveL-MSFT
Steve Lee (SteveL-MSFT) deleted the psrp-text branch June 28, 2018 01:30
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
…r to help troubleshoot (PowerShell#7168)

PSRP currently relies on XML for the transport messages.  When using PSRP over SSH, if the target side fails, it sends back a text message.  PSRP sees this and doesn't know what to do so it throws
a generic message which makes troubleshooting the issue more difficult.  Change here is to throw
the text message which now looks like:

>new-pssession : [test-machine] There is an error processing data from the background process. Error reported: Invalid argument '-np', did you mean:.

Previously:

>new-pssession : [test-machine] There is an error processing data from the background process. Error reported: Cannot process an element with node type "Text". Only Element and EndElement node types are supported..

Since it's processing one line at a time, not able to get the whole message.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants