Enter-PSSession on the remote server fails with "cannot find computer"

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

If I do this:

Enter-PSSession -ComputerName *ServerName*** 

I get the following error message from winrm

Enter-PSSession: Connection to the remote xxx server failed using the following error message: WinRM cannot process the request. When using Kerberos authentication: cannot find xxx computer. Verify that the computer exists on the network and that the name you entered is spelled correctly. *

It doesn't matter if I use only the server name or if I enter it fully qualified.

Both systems show $PSVersionTable.PSVersion 4 0 -1 -1

I tried various troubleshooting tips I found, i.e.
run Enable-PSRemoting -Force , and also set TrustedHosts = * on both sides.
I also turned off the firewall service on both sides.
When I try to login-PSSession from the server to my desktop, it works as it sees fit.
But from my desktop to the server, I always get an error message that the computer could not be found.

+7
powershell-remoting
source share
5 answers

run winrm quickconfig from a powershell session on the remote computer.

+1
source share

After talking with our domain administrator, I think I found the cause of the problem.
The server is located in the resource domain, which has only one-way trust in the main organizational unit.
This explains why I can delete PS from the server to clients, but not vice versa.
I found that I can use the IP address with the -Credential option in my case, although this is not good, but a workaround is acceptable.

+1
source share

In my case, DNS was pointing to the correct IP address, but there was a typo in the host name, so the base parameter -Computername and the actual host name did not match.

+1
source share

Check domain replication and see if there is a computer object where it should be. This is what I was dealing with computer objects that were not replicated from one domain controller to another.

There is a self-signed certificate under the local computer / RDP ... make sure the WinRM service is used there.

See if you can find out if there is any firewall that can block WinRM ports.

Hope this helps.

0
source share

This is most likely due to the fact that your netbios name is different from the server host name. Try connecting with the name netbios.

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

"$ ENV :. COMPUTERNAME $ ENV: USERDNSDOMAIN"

0
source share

All Articles