PowerShell remoting from machine running PS v4 to machine running PS v5

Hi, today by fluke I found out that from servers running Windows Server 2012 R2 (PowerShell v4) I could not connect remotely to servers running Windows Server 2016/2019 (PowerShell v5.1) - Test-WSMan command fails and Test-NetConnection to port 5985 returns true meaning firewall is not blocking communication. Is this “normal”? PowerShell remoting from machines running Windows Server 2016 to machines running Windows Server 2016/2019 works fine.

We are planning to upgrade all Windows Servers 2012 R2 directly to Windows Server 2019 but for now some servers like System Center Configuration Manager are still on Windows Server 2012 R2 and this problem is showstopper in some extent. If this is related only to PowerShell version I can install WMF 5.1 on Windows Server 2012 R2 systems …

Hello Bojan,

I had a similar problem with RDP connections, maybe the cause is the same. If so you might find a solution in

Error CredSSP encryption oracle remediation when you try to RDP to a Windows VM in Azure - Virtual Machines | Microsoft Docs

The workarounds helped me and were acceptable since all concerned machines were considered trustworthy. Maybe your problem is completely unrelated but, well, it won’t hurt trying out. You can easily test by verifying whether your RDP connections work and see if you get the “Oracle-remediation error”.

Hope this helps,

Kris.

Your problem could definitely be caused by credential issues. Are all of these servers on the same domain?

Depending on how your remote path works, you may have to solve the double hop problem.

Same domain. As I said this is only happening with Windows Server 2012 R2 –> Windows Server 2016/2019 PS remoting. Windows Server 2016/2019 –> Windows Server 2016/2019 PS remoting works fine.

Hmm, you say that Test-WSMan fails - are you sure that the WinRM is enabled on the target systems?
Going through it step-by-step may be helpful, as described here: Understanding and troubleshooting WinRM connection and authentication: a thrill seeker's guide to adventure — Hurry Up and Wait!

Also, what happens if you try to go the other direction, e.g. Windows Server 2016 -> Windows Server 2012 R2?

As expected, my Server 2012 R2 with WMF 5.1 connects to Server 2016 no problem. Does remoting between 2012 R2 systems work?