New-PSSession error for 2 out 3 -computers

Welcome Forums General PowerShell Q&A New-PSSession error for 2 out 3 -computers

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

2 years, 9 months ago.

  • Author
  • #37261

    Points: 71
    Rank: Member

    I run:

    New-PSSession -ComputerName dc1,dc2,dc3

    dc2 gets a new PSSession while dc1 and dc3 each get this error:

    "The WinRM client cannot process the request because the server name cannot be resolved. For more information, see the about_Remote_Troubleshooting Help topic."

    I have tried the following:

    ~ validated with nslookup; fully resolving dc1 and dc3
    ~ read about_Remote_Troubleshooting
    ~ read about_Remote_Requirements
    ~ re-run Enable-PSRemoting on both erroring dcs
    ~ validated port 5985 is LISTENING from my console (running under Administrator context)

    What is causing WinRM failing to resolve the server name?

    thank you

  • #37263

    Points: 71
    Rank: Member

    I tried the FQDN in the -ComputerName parameter and it created the sessions.

  • #37265

    Points: 26
    Rank: Member

    Looks like you have a name resolution problem. The NETBIOS name doesn't work, so try to empty your cache with: nbtstat -R

    If this doesn't work, check the network category on your computer and/or the domain controllers with Get-NetConnectionProfile. This should be set to "DomainAuthenticated".
    If not, set them to DomainAuthenticated:

    Set-NetConnectionProfile -InterfaceAlias 'Ethernet' -NetworkCategory DomainAuthenticated

    After run Enable-PSRemoting again to create the appropiate firewall rules on the Windows Firewall.

  • #37266

    Points: 71
    Rank: Member

    Hi Richard,

    I simply had to add the DNS name to the network adapters DNS suffix search list.


The topic ‘New-PSSession error for 2 out 3 -computers’ is closed to new replies.