WinRM is already set up to receive requests on this computer.
WinRM has been updated for remote management.
Created a WinRM listener on HTTP://* to accept WS-Man requests to any IP on this machine.
WinRM firewall exception enabled.
Configured LocalAccountTokenFilterPolicy to grant administrative rights remotely to local users.
(Legacy) Self-signed SSL certificate generated; thumbprint: DCDC74FDA8CADDB6667804DA9A683CA72D79C77A
New-WSManInstance : The WinRM client cannot process the request. The certificate CN and the hostname that were
provided do not match.
At C:\ConfigureRemotingForAnsible.ps1:145 char:5
Getting above error.
I checked $env.ComputerName which is used for CN and hostname values are same. Still I am getting above error.
Need help in resolving this
Do you have the legacy winrm connectors set up (winrm originally listened on ports 80 (http) and 443 (https)?
If you don’t need these, then please remove them - there is an open defect regarding handling legacy listeners which stops the setup module from gathering facts.