Connect-PSSession from server running powershell 5

Welcome Forums General PowerShell Q&A Connect-PSSession from server running powershell 5

This topic contains 5 replies, has 2 voices, and was last updated by

 
Keymaster
2 years, 5 months ago.

  • Author
    Posts
  • #39294

    Participant
    Points: 0
    Rank: Member

    I have created remote disconnected pssession on a large number of servers. When I attempt to reconnect them, I receive this error:

    'Windows Powershell does not support connect operation on the protocolversion 2.3 negotiated by the client. Make sure the client is compatible with the build 6.2.9200.17065 and the protocol version 2.2 of Windows Powershell'

    I created the remote sessions from a server running powershell 5.0.10586.117, and the remote servers are running Server 2012 with powershell 1.

    Before I upgraded my remote admin machine to powershell 5, I could connect remote disconnected pssessions without errors.

    Is there a sessionOption or some other workaround I can use?

  • #39296

    Keymaster
    Points: 7
    Rank: Member

    The remote servers are definitely not running PowerShell 1. PowerShell 1 didn't have Remoting, and doesn't run on Win2012.

    They're likely running v2, but you'd need to check. The older Remoting protocol in v2 doesn't support disconnect/connect. Run $PSVersionTable on both machines and paste the results here – that'll help diagnose things.

    Bottom line, though, if the two copies of PowerShell aren't connecting over a compatible version of the protocol, then there's nothing you can do to change this.

  • #39297

    Participant
    Points: 0
    Rank: Member

    Hi Don, thanks for the reply. Here's the output:

    PSVersion: 3.0
    WSManStackVersion: 3.0
    SerializationVersion: 1.1.0.1
    CLRVersion: 4.0.30319.18449
    BuildVersion: 6.2.9200.17065
    PSCompatibleVersion: {1.0,2.0,3.0}
    PSRemotingProtocolVersion: 2.2

    My admin machine, which I'm connecting from, has PSRemotingProtocolVersion = 2.3

  • #39300

    Keymaster
    Points: 7
    Rank: Member

    Seems odd. v3 supported disconnect/reconnect. However, it apparently isn't working between those two different versions. Not much you can do about it, unfortunately. It's possible it's a bug, actually.

  • #39311

    Participant
    Points: 0
    Rank: Member

    Don, nothing's changed on the target server side, only on my admin workstation, where I installed WMF5.

    If this is indeed a bug, how do I let MS know?

  • #39312

    Keymaster
    Points: 7
    Rank: Member

    The UserVoice page for PowerShell.

The topic ‘Connect-PSSession from server running powershell 5’ is closed to new replies.