I have one system where I cannot connect to remote computer (or to itself remotely) using PowerShell when computer name contains dot.
For example, this works:
Enter-PSSession HostA -Credential user1
But this doesn't:
Enter-PSSession 192.168.0.1 -Credential user1
This doesn't work either:
Enter-PSSession HostA.DomainA -Credential user1
Same problem happens when I try to connect PS-Session over network to the same computer using its IP address or full domain name (or just by adding dot to its short name). The only exception is "127.0.0.1" - in that case remote PS connection works. I am setting TrustedHosts to '*' - that doesn't make any difference.
I have another system which doesn't exhibit this behavior - i.e. where I can use IP addresses and fully-qualified host names interchangeably. I don't see any obvious difference in configurations between these systems.
I'm getting the following error:
Enter-PSSession : Connecting to remote server 192.168.0.1 failed with the following error message : The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig". For more information, see the about_Remote_Troubleshooting Help topic. At line:1 char:1 Enter-PSSession 192.168.0.1 -Credential user1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (192.168.0.1:String) [Enter-PSSession], PSRemotingTransportException + FullyQualifiedErrorId : CreateRemoteRunspaceFailed
Does anyone have an idea of what's causing this ?