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.
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.