Configure Custom SSL Certificate for RDP on Windows Server at Remote administration mode

Source: Internet
Author: User
Tags ssl certificate

Q:

So the release of Windows Server have removed a lot of the old Remote Desktop related configuration utilities. In particular, there are no more Remote Desktop Session Host Configuration Utility This gave you access to the RDP -TCP Properties dialog that let's configure a custom certificate for the RDSH to use. In it place was a nice new consolidated GUI that's part of the overall "Edit deployment Properties" workflow in the new S Erver Manager. The catch is so you only get access to that workflow if you have the Remote Desktop Services role installed (as far as I can tell).

This seems is a bit of a oversight on Microsoft's part. How can we configure a custom SSL certificate for RDP on Windows Server if it's running in the default Remote Admin Istration mode without needlessly installing the Remote Desktop Services role?

Important:you need open a CMD by "Run as Administrator" then perform the WMIC command.

A:

Vote Accepted

It turns out this much of the configuration data for RDSH are stored in the win32_tsgeneralsetting class in WMI in The root\cimv2\terminalservices namespace. The configured certificate for a given connection are referenced by the thumbprint value of this certificate on a property Called Sslcertificatesha1hash.

In order to get the thumbprint value

    1. Open the properties dialog for your certificate and select the Details tab
    2. Scroll down to the Thumbprint field and copy the space delimited hex string into something like Notepad
    3. Remove all the spaces from the string. You'll also want to watch out for and remove a non-ascii character that sometimes gets copied just before the first Charac ter in the string. It ' s not visible in Notepad.
    4. This is the value of need to set in WMI. It should look something like this: 1ea1fd5b25b8c327be2c4e4852263efdb4d16af4.

Now it has the thumbprint value, here's a one-liner you can use to set the value using WMIC:

wmic /namespace:\\root\cimv2\TerminalServices PATH Win32_TSGeneralSetting Set SSLCertificateSHA1Hash="THUMBPRINT"

Or If PowerShell is your thing, you can use this instead:

$path = (Get-WmiObject -class "Win32_TSGeneralSetting" -Namespace root\cimv2\terminalservices -Filter "TerminalName=‘RDP-tcp‘").__pathSet-WmiInstance -Path $path -argument @{SSLCertificateSHA1Hash="THUMBPRINT"}

It occurs to me the this solution would probably work on Windows 8 systems as well. I Haven ' t played with it much myself yet though.

Note: The certificate must is in the ' Personal ' certificate Store for the computer account.

Configure Custom SSL Certificate for RDP on Windows Server at Remote administration mode

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.