Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Override of HostName in WSManListener #11

Closed
PlagueHO opened this issue Jan 13, 2018 · 1 comment · Fixed by #12
Closed

Enable Override of HostName in WSManListener #11

PlagueHO opened this issue Jan 13, 2018 · 1 comment · Fixed by #12
Assignees
Labels
enhancement The issue is an enhancement request.

Comments

@PlagueHO
Copy link
Member

From Issue #8 raised by @ttdgcp:

I've been testing with the latest version you've released, and am seeing the following error when using a certificate thumbprint:
The WinRM client cannot process the request. The certificate CN and the hostname that were provided do not match.

I am using the following configuration:
Ensure = "Present"
Transport = "HTTPS"
CertificateThumbprint = "$thumbprinthere"

I believe this is because I cannot specify (and write) the HostName parameter that the WinRM client demands. If we could add the hostname parameter to be able to write, I believe that would solve my use case.

We're able to bind the certificate to a WSMan listener with the following command:
New-WSManInstance winrm/config/Listener -SelectorSet @{ Address="*";Transport="HTTPS"} -ValueSet @{Hostname="devOps";CertificateThumbprint=$thumbprint}

It's certainly a bit unorthodox, but it fits our use case.

Let me know if I can help any further- thank you for supporting this!

@PlagueHO PlagueHO added the enhancement The issue is an enhancement request. label Jan 13, 2018
@PlagueHO PlagueHO self-assigned this Jan 13, 2018
PlagueHO added a commit that referenced this issue Jan 13, 2018
Adds the Hostname parameter to WsManListener to enable overriding the hostname in an HTTPS - Fixes #11
@PlagueHO
Copy link
Member Author

@ttdgcp - I've released this to the PSGallery now as version 2.2.0.84:
https://www.powershellgallery.com/packages/WSManDsc/2.2.0.84

Check in the Wiki for examples of how to use this:
https://github.com/PlagueHO/WSManDsc/wiki/WSManListener#example-5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is an enhancement request.
Projects
None yet
1 participant