0

We have been using powershell to remotely connect between computers, successfully, in Windows 7, Windows 10. As part of the companies computers upgrade to Windows 11, we have been noticing the powershell remote connection script fails.

I am talking about a simple New-PsSession command, like

new-pssession -computerName "123.123.123.123" -Authentication Negotiate -Credential WORKGROUP\myUser

which, upon success, returns

enter image description here

and, upon failure enter image description here

Googling and playing around, I have checked and compared:

  1. Get-NetConnectionProfile (and setting it to public ("manual firewall bypassing")
  2. winrm get winrm/config/client/auth
  3. Client PCs Powershell versions I have discarded as being related, since 2 of the Win 10 machines I can connect to have different PS versions installed (and those to which I can't connect have the same versions as one of these).

I find a difference in the results of running (2) between Win 10 and 11. A Win 10 computer to which I can connect returns

Auth
    Basic = true
    Digest = true
    Kerberos = true
    Negotiate = true
    Certificate = true
    CredSSP = false

While a Win 11 to which I can't returns:

Auth
    Basic = false [Source="GPO"]
    Digest = false [Source="GPO"]
    Kerberos = true
    Negotiate = true
    Certificate = true
    CredSSP = false

Tried manually setting Basic and Digest to true, but no deal. Perhaps the Source=GPO (Windows Group Policy Objects) is the lead, but I have no knowledge on windows administration I wanted first to make sure I will not waste time.

Would be happy if those who are familiar with the topic could point me to the right direction.
Thanks !

Veverke
  • 9,208
  • 4
  • 51
  • 95
  • 1
    Code should run the same on Windows 10 & 11. If code is failing than something is wrong with the Group Policy and the user group isn't being recognized on Windows 11. For windows credential to work the local and remote machines have to use the same password server to validate the credentials. Which means the user has to be able to login to remote machine with same credentials as local machine. – jdweng Nov 13 '22 at 10:49

0 Answers0