Skip to content

Add detail to error message that Disconnect is only supported with WSMan #6689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2018

Conversation

SteveL-MSFT
Copy link
Member

@SteveL-MSFT SteveL-MSFT commented Apr 20, 2018

PR Summary

If you use Disconnect-PSSession with a PSSession using any transport other than WSMan, the error message doesn't give enough details why it failed. Fix is to specify that this capability is only supported with WSMan.

Fix #5313

PR Checklist

@SteveL-MSFT SteveL-MSFT requested a review from PaulHigin April 20, 2018 13:57
@@ -202,7 +202,7 @@
<value>There is no disconnected command associated with this runspace.</value>
</data>
<data name="DisconnectNotSupportedOnServer" xml:space="preserve">
<value>The disconnection operation is not supported on the remote computer. To support disconnecting, the remote computer must be running Windows PowerShell 3.0 or a later version of Windows PowerShell.</value>
<value>The disconnection operation is not supported on the remote computer. To support disconnecting, the remote computer must be running Windows PowerShell 3.0 or a later version of Windows PowerShell and using the WSMan transport.</value>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the message I understand nothing that I should do.
Maybe simply say "The disconnection operation is not supported for SSH sessions."

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's also not supported for named pipes and PowerShell Direct remoting. The doc update I linked in the PR description should hopefully make this more clear.

@iSazonov
Copy link
Collaborator

@SteveL-MSFT Is the PR really fix #5313? Maybe not close the Issue?

@SteveL-MSFT
Copy link
Member Author

@iSazonov there's no immediate plan to support Connect/Disconnect with anything other than WSMan. I've submitted some doc updates to reflect this. Longer term, we will want to support this scenario. However, on Linux/macOS, you would use screen which isn't available on Windows. I think it's fine to close this issue as we'll have to revisit the SSH remoting hosting problem when we try to enable JEA for SSH remoting.

@daxian-dbw daxian-dbw self-assigned this Apr 23, 2018
@daxian-dbw daxian-dbw merged commit 10900e0 into PowerShell:master Apr 24, 2018
@SteveL-MSFT SteveL-MSFT deleted the disconnect-error branch October 26, 2018 21:34
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.

Beta.9 - Disconnect-PSSession not supporting ssh disconnect sessions.
4 participants