I have a Windows server where cloudflared is running. I completed all steps to set up a tunnel in Zero Trust panel. WinRM service is running on the server, and its access and port are allowed in the firewall.
I also connected to the tunnel successfully from my client machine with:
cloudflared access tcp --hostname winrm.mydomain.com --url tcp://localhost:5985
Now I’m trying to start a remote Powershell session from my client machine using the command below:
Enter-PSSession -ComputerName localhost -Port 5985 -Credential (Get-Credential)
After providing my server credentials, Powershell returns this error:
Enter-PSSession: Connecting to remote server localhost failed with the following error message : MI_RESULT_FAILED For more information, see the about_Remote_Troubleshooting Help topic.
What could be the problem?