Installing an SSL certificate for the RDP service

Installing an SSL certificate on an RDP service using PowerShell commands is an easy and convenient way to provide secure remote desktop access on your server. You will definitely have to do this if you are using a TerminalServer farm (a session-based terminal server farm). In this article, we will look at how to install an SSL certificate on an RDP service using PowerShell commands.

Step 1: Creating a certificate request and installing it (this article will not consider it.).

Step 2: Install certificate on RDP service

Now we can install the certificate on the RDP service. For this:

  1. Open the MMC snap-in and in the "Certificates" snap-in for "Local Computer" in the "Personal" section, open the certificate installed earlier.
  2. In the "Composition" tab, find the "Imprint" item (it's "Thumbprint") and copy it (useful in the next step.)
  3. Open PowerShell in administrator mode and run the following command:

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

<Thumbprint> replace with the thumbprint of the certificate installed in step 2 point 3.

Restarting the OS and service is not required.

Leave a comment

Towar dobavlen in korzinu.
0 items - 0,00 RUB
Open chat
Can I help you?
Scan the code
Hello 👋
How can I help you?
This is not a chatbot! People answer here, so not always instantly 😳
We use cookies to best represent our site. By continuing to use this site, you agree to the use of cookies.