Invoke-DscResource always create a CimSession to invoke the DSC resource using WSMan over HTTP
I am trying to install SQLServer 2019 on Windows Server 2019 using ansible and SqlServerDsc I am getting aN error about missing CimClass MSFT_SqlSetup.
The error happens when ONLY HTTPS listener is active (The HTTP listener is deleted)
The investigation from Ansible team shows that the problem comes down to Invoke-DscResource always creating a CimSession to invoke the DSC resource using WSMan over HTTP by the default configured port. The only thing we can control is the port but even then it won't work for the HTTPS listener as the wrong protocol will be used.