T The Triage ManualTechnical Guides for IT Emergencies
P4 · PKI & Certificate Management

Assign custom SSL certificate to RDP on Windows Server 2012+ without RDS role (Remote Administration mode)

Windows Server 2012 removed tsconfig.msc and the RDP-Tcp properties GUI, making it non-obvious how to assign a custom SSL certificate to RDP when the Remote Desktop Services role is not installed. The certificate binding is stored in WMI under Win32_TSGeneralSetting and can be set directly via WMIC or PowerShell by writing the certificate's SHA1 thumbprint to the SSLCertificateSHA1Hash property. Without this configuration the server presents a self-signed certificate, which generates untrusted-certificate warnings for connecting clients.

Indicators

Likely causes

Diagnostic steps

  1. Confirm the custom SSL certificate is installed in the Computer account Personal store: open certlm.msc > Personal > Certificates and verify the certificate appears with the correct subject and expiry.
  2. Retrieve the certificate SHA1 thumbprint from the Details tab in certlm.msc, or via PowerShell: gci -path cert:/LocalMachine/My | Select-Object Subject, Thumbprint | Format-List
  3. Clean the thumbprint string: remove all spaces and check for hidden non-ASCII characters that certlm.msc sometimes inserts at the start. The clean string should resemble: 1ea1fd5b25b8c327be2c4e4852263efdb4d16af4
  4. Query the current RDP-Tcp WMI configuration to confirm access and view the existing thumbprint: Get-WmiObject -Class 'Win32_TSGeneralSetting' -Namespace root\cimv2\terminalservices -Filter "TerminalName='RDP-tcp'" | Select-Object SSLCertificateSHA1Hash
  5. Set the certificate via WMIC: wmic /namespace:\\root\cimv2\TerminalServices PATH Win32_TSGeneralSetting Set SSLCertificateSHA1Hash="<THUMBPRINT>"
  6. Alternatively, set the certificate via PowerShell: $path = (Get-WmiObject -Class 'Win32_TSGeneralSetting' -Namespace root\cimv2\terminalservices -Filter "TerminalName='RDP-tcp'").__path; Set-WmiInstance -Path $path -Argument @{SSLCertificateSHA1Hash='<THUMBPRINT>'}
  7. Verify the change by re-querying Win32_TSGeneralSetting and confirming SSLCertificateSHA1Hash matches the new thumbprint.
  8. Open a new RDP session to the server and inspect the presented certificate to confirm the custom certificate is now in use.

Resolution path

Prevention

Tools

References

rdpssl-certificatewindows-server-2012windows-server-2016windows-server-2019windows-server-2022wmiwin32-tsgeneralsettingpowershellwmicremote-desktopremote-administrationcertificate-thumbprintcertlmno-rds-rolepki