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

Welcome Forums General PowerShell Q&A PowerShell remoting from machine running PS v4 to machine running PS v5

Viewing 5 reply threads
  • Author
    Posts
    • #183570
      Participant
      Topics: 36
      Replies: 42
      Points: 42
      Rank: Member

      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 ...

    • #183609
      Participant
      Topics: 1
      Replies: 20
      Points: 57
      Helping Hand
      Rank: Member

      Hello Bojan,

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

      https://support.microsoft.com/en-gb/help/4295591/credssp-encryption-oracle-remediation-error-when-to-rdp-to-azure-vm

      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.

    • #183624
      Participant
      Topics: 3
      Replies: 68
      Points: 366
      Helping Hand
      Rank: Contributor

      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.

    • #183711
      Participant
      Topics: 36
      Replies: 42
      Points: 42
      Rank: Member

      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.

    • #183873
      Participant
      Topics: 3
      Replies: 68
      Points: 366
      Helping Hand
      Rank: Contributor

      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: http://www.hurryupandwait.io/blog/understanding-and-troubleshooting-winrm-connection-and-authentication-a-thrill-seekers-guide-to-adventure

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

    • #183927
      Participant
      Topics: 10
      Replies: 116
      Points: 451
      Helping Hand
      Rank: Contributor

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

Viewing 5 reply threads
  • You must be logged in to reply to this topic.