Enter-PSSession to remote server fails with “cannot find the computer”

前端 未结 5 2061
忘了有多久
忘了有多久 2021-01-03 21:55

My desktop is win7 and I am trying to connect to a server 2012.
Both hosts are on the same domain.

If I do:

Enter-PSSession -ComputerName *Serve         


        
5条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-03 22:27

    This is most likely caused by your netbios name being different from the server's hostname. Try to connect with the netbios name instead.

    • Determine the correct name by running the following command in powershell:

    "$env:COMPUTERNAME.$env:USERDNSDOMAIN"

提交回复
热议问题