locked
Win RM Configuration via Powershell RRS feed

  • Question

  • Hello gents,

    I am trying to configure WinRM on our SharePoint farm but I am stuck. We can't request multiple certificates for one hostname (som sort of information security policy). So I am using a certificate issued to server "A" and server "B" is in the Subject Alternative Name. Configuring WinRM on the server "A" was fine. No problem what so ever. But I can't make it work on the server "B". Technet says it should work with Subject Alternative Name as well: https://support.microsoft.com/en-us/help/2019527/how-to-configure-winrm-for-https

    Script: 

    New-WSManInstance winrm/config/Listener -SelectorSet @{Address='*';Transport="HTTPS"} ` -ValueSet @{Hostname=$LocalhostFQDN;CertificateThumbprint=$CertThumbPrint} ` -Verbose -ErrorAction Continue

    Error:

    New-WSManInstance : The WinRM client cannot process the request. The certificate CN and the hostname that were provided do not match. 
    At line:31 char:1
    + New-WSManInstance winrm/config/Listener -SelectorSet @{Address='*';Tr ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [New-WSManInstance], InvalidOperationException
        + FullyQualifiedErrorId : WsManError,Microsoft.WSMan.Management.NewWSManInstanceCommand

    Thanks for any hint.

    Jakub


    • Edited by Chahoosa Friday, June 16, 2017 1:25 PM spelling
    Friday, June 16, 2017 12:47 PM

All replies

  • Hi Jakub,

    >>The certificate CN and the hostname that were provided do not match

    This error is clarity: your CN and FQDN not matched in DNS resolving.

    As mentioned, you can't request multiple cert for one hostname, so the only way is try using: CName in DNS resolution to see if it helps.

    Furthermore, adding some entry in your local host files might also helps.

    See related link below:

    https://technet.microsoft.com/en-us/library/dd891009.aspx?f=255&MSPPError=-2147217396

    Best regards,

    Andy


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Proposed as answer by Hello_2018 Thursday, June 22, 2017 6:34 AM
    Monday, June 19, 2017 4:58 AM