How to Use SSL Certificate for RDP by Using Management Instrumentation (WMI) script

1. Start Microsoft Management Console (MMC) Tool and import the Personal SSL certificate for the computer account

1.1 Click Start -> Run -> Enter MMC and click OK

 

 

 

 

 

 

 

 

 

 

 

1.2 Click File -> Add/Remove Snap-In...

 

 

 

 

 

 

 

 

 

 

1.3 Select Certificates in left panel and click Add to move it to right panel , then Click OK

1.4 Select Computer Account option and click Next

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1.5 Click Finish

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1.6 Click OK

1.7 Expand Certificates Node and right click Personal -> Certificates -> All Tasks -> Import

1.8 Click 'Browse' to select correct Certificate file and click Next

1.9 Click "Finish" to complete the certificate Import Wizard

2. Click the imported certificate, in the 'Details' option, scroll down to the Thumbprint field and copy the space delimited hexadecimal string into a .txt file

3. Remove all spaces in the string from the .txt file

 

4. At command prompt, run the following wmic command together with the thumbprint

wmic /namespace:\\root\cimv2\TerminalServices PATH Win32_TSGeneralSetting Set SSLCertificateSHA1Hash="d4274aea12dbfff5c11c389d8c7d1f23e76932cf"
 
RDP Certificate can be easily set via tool MicrosoftEasyFix20151.mini.diagcab.
 

5. Test RDP authentication connection

Note: : The referenced article is https://support.microsoft.com/en-au/help/3042780/remote-desktop-listener-certificate-configurations-in-windows-server-2
 
 

Add Feedback