我在Win7 Embedded SP1 32位工作站上断开了会话。我正在尝试连接到该会话。当我尝试连接时,我得到一个错误,表明PSRemotingProtocolVersion不匹配。我可以看到我的Windows 8.1工作站有2.3版,Win7工作站有2.2版。如何更正此问题以便我可以连接到断开连接的会话?
以下是我的会议摘录......
PS C:\> Get-PSSession ef-pos-01.faculty.example.org
Id Name ComputerName State ConfigurationName Availability
-- ---- ------------ ----- ----------------- ------------
1 Session3 ef-pos-01.fa... Disconnected Microsoft.PowerShell None
PS C:\> Get-Pssession ef-pos-01.faculty.example.org | Connect-PSSession
Connect-PSSession : The connect operation failed for session Session3 with the following error message: Connecting to remote server
ef-pos-01.faculty.example.org failed with the following error message : The server that is running Windows PowerShell does not support connect operations on
the protocolversion 2.3 that is negotiated by the client computer. Make sure the client computer is compatible with the build 6.3.9600.16406 and the protocol
version 2.2 of Windows PowerShell. For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:46
+ Get-Pssession ef-pos-01.faculty.example.org | Connect-PSSession
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Connect-PSSession], RuntimeException
+ FullyQualifiedErrorId : -2141974621,PSSessionConnectFailed,Microsoft.PowerShell.Commands.ConnectPSSessionCommand
PS C:\> Enter-PSSession ef-pos-01.faculty.example.org
[ef-pos-01.faculty.example.org]: PS C:\Users\mike.mackenna\Documents> $PSVersiontable
Name Value
---- -----
PSVersion 4.0
WSManStackVersion 3.0
SerializationVersion 1.1.0.1
CLRVersion 4.0.30319.17929
BuildVersion 6.3.9600.16406
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion 2.2
[ef-pos-01.faculty.example.org]: PS C:\Users\mike.mackenna\Documents> exit
PS C:\> $PSversionTable
Name Value
---- -----
PSVersion 5.0.10105.0
WSManStackVersion 3.0
SerializationVersion 1.1.0.1
CLRVersion 4.0.30319.34209
BuildVersion 10.0.10105.0
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
答案 0 :(得分:1)
我遇到了将Windows 10(PS 5)连接到Server 2012(PS 3)的问题。我可以创建会话并执行任何操作,但无法重新连接到它,即使是从服务器也是如此。同样,我可以在服务器上创建并重新连接(到localhost)但是尝试从我的计算机连接失败并打破了会话。
我通过在服务器上安装WMF5来解决这个问题,将它带到PowerShell 5,现在运行顺利。