Error setting up HTTPS endpoint for WinRM

I have been working on an issue with getting the HTTPS endpoint for WinRM to bind to the self signed cert the Ansible setup script creates. I’m pretty stumped at this point, it seems I had it working at one time but after rebuilding the workspace I am back to square one. All controls I can think of have been turned off, UAC, Firewall, CredSSP. Here is the log output:

.\ConfigureRemotingForAnsible.ps1 -Verbose
VERBOSE: Verifying WinRM service.
VERBOSE: PS Remoting is already enabled.
(Legacy) Self-signed SSL certificate generated; thumbprint: XXXXXXXXXXXXX
VERBOSE: Enabling SSL listener.
New-WSManInstance : A specified logon session does not exist. It may already have been terminated.
At D:\Users\wdesk.synctesting\downloads\ansible-devel\examples\scripts\ConfigureRemotingForAnsible.ps1:216 char:5

  • New-WSManInstance -ResourceURI ‘winrm/config/Listener’ -SelectorSet $selecto …
  • CategoryInfo : InvalidOperation: (:slight_smile: [New-WSManInstance], InvalidOperationException
  • FullyQualifiedErrorId : WsManError,Microsoft.WSMan.Management.NewWSManInstanceCommand

What’s your operating system?