PSSession

Hello Everyone,

First I’m new to PowerShell and I was trying to establish PSSession to a remote computer within the same domain and it worked first and now all of a sudden I cannot establish the connection again and keeps getting:

New-PSSession : [AHCDC02] Connecting to remote server AHCDC02 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.

WinRM is running

Try restarting the WinRM service, first.

Ensure DNS is resolving the correct IP address. You can try pinging the computer by name to check the IP returned.

Then, if you can access the console of the same computer, see if that computer can connect to itself.

Thanks Don for the prompt reply!

I did Restarted the WinRM, made sure that the DNS is resolving the computername.

Now I’m at the console of the target computer and I cannot connect to it.

If the computer cannot connect to itself, then something is borked. But you’re down to basic network troubleshooting, here - you’re “below” PowerShell at this point. Check the local firewall, for example. Restart the computer. Try re-running Enable-PSRemoting. But ultimately, until the computer can connect to itself, nothing else is going to work.

Thank you so much Don!