So the release of Windows Server 2012 has removed a lot of the old Remote Desktop related configuration utilities. In particular, there is no more Remote Desktop Session Host Configuration utility that gave you access to the RDP-Tcp properties dialog that let you configure a custom certificate for the RDSH to use. In its place is a nice new consolidated GUI that is part of the overall "edit deployment properties" workflow in the new Server Manager. The catch is that you only get access to that workflow if you have the Remote Desktop Services role installed (as far as I can tell).
This seems like a bit of an oversight on Microsoft's part. How can we configure a custom SSL certificate for RDP on Windows Server 2012 when it's running in the default Remote Administration mode without needlessly installing the Remote Desktop Services role?
It turns out that much of the configuration data for RDSH is stored in the
Win32_TSGeneralSetting
class in WMI in theroot\cimv2\TerminalServices
namespace. The configured certificate for a given connection is referenced by the Thumbprint value of that certificate on a property calledSSLCertificateSHA1Hash
.UPDATE: Here's a generalized Powershell solution that grabs and sets the thumbprint of the first SSL cert in the computer's personal store. If your system has multiple certs, you should add a
-Filter
option to thegci
command to make sure you reference the correct cert. I've left my original answer intact below this for reference.In order to get the thumbprint value
Now that you have the thumbprint value, here's a one-liner you can use to set the value using wmic:
Or if PowerShell is your thing, you can use this instead:
Note: the certificate must be in the 'Personal' Certificate Store for the Computer account.
If you getting "Invalid Parameter" when you trying Ryan's solution, make sure you are using elevated command prompt (run as administrator).
You need your
domain.pfx
& the fingerprint in a txt fileSSLCertificateSHA1Hash.txt
.Then run this in CMD: