About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
A Remote Desktop certificate warning appears when the server presents a certificate that the connecting computer has no reason to trust. On a server with no certificate configured, that is the default self-signed certificate. Microsoft's pages do not print the wording of the client's warning dialog, so this guidance anchors on what they do document: a WMI property, SSLCertificateSHA1HashType, whose value 1 means "Default self-signed", and Event ID 1064 for template-based certificates. Read the property first. If it is 1, bind a certificate from your own certifying authority (CA) by setting SSLCertificateSHA1Hash to its thumbprint, or let Group Policy choose the certificate from a template.
Clicking through the warning on every connection trains people to ignore it. Replacing the certificate once, correctly, removes the warning for everyone who trusts your CA.
What the error means
When Remote Desktop uses TLS to protect the connection, the server proves who it is with a certificate. Microsoft's description of the security layer setting says SSL (TLS 1.0) "is used for server authentication and for encrypting all data transferred between the server and the client" and "requires the server to have an SSL-compatible certificate". The page describes the Negotiate layer as using TLS "if supported". Microsoft's class page gives the security layer values in two different numberings, so read the setting by name in the Remote Desktop settings and not by number.
The Remote Desktop Session Host Group Policy documentation (written for Windows Server 2008 R2) states the default: "If you disable or do not configure this policy setting, a self-signed certificate will be used by default to authenticate the RD Session Host server." A self-signed certificate is signed by the server itself, so no client holds a trust anchor for it. The warning is the client saying exactly that.
The WMI class Win32_TSGeneralSetting (namespace Root\CIMv2\TerminalServices, Windows Server 2008 and later) exposes the state. SSLCertificateSHA1Hash is read/write and "specifies the SHA1 hash in hexadecimal format of the SSL certificate for the target server to use". SSLCertificateSHA1HashType is read-only and reports the state of that hash: 0 not valid, 1 default self-signed, 2 default group policy enforced, 3 custom.
The Microsoft pages cited here do not describe how a client matches the name typed in the Remote Desktop client against the certificate. Test from a real client after any change.
Likely causes
| Cause | What you see | How to confirm |
|---|---|---|
| No certificate has been assigned | SSLCertificateSHA1HashType is 1 |
Query the class (see below) |
| A certificate is assigned, but the client does not trust its CA | SSLCertificateSHA1HashType is 3 and the warning persists on some clients only |
Inspect the issuing chain on an affected client with the Certificates snap-in |
| Group Policy template is set but no matching certificate exists | Event ID 1064 on the server (the pages do not say which type value accompanies it) | Read the System and Remote Desktop event logs; check the template name in the policy |
| Template permissions or key usage are wrong | Event ID 1064 with an enrolment error | Check Enroll permission and the Server Authentication enhanced key usage on the template |
| Name mismatch between the name users type and the certificate (a possibility; the pages do not describe the matching) | A warning only on connections by a name the certificate does not carry | Compare the typed name with the certificate subject and alternative names |
| Certificate expired | Warning appears on a certificate that used to work | Check the certificate's validity dates in the Certificates snap-in |
Event ID 1064 is documented for source Microsoft-Windows-TerminalServices-RemoteConnectionManager, symbolic name EVENT_TS_SSL_TEMPLATE_CERT_CREATE_FAILED, with the message "The terminal server cannot install a new template-based certificate to be used for Transport Layer Security (TLS) 1.0\Secure Sockets Layer (SSL) authentication and encryption." Microsoft lists five conditions behind it: wrong template name in policy, no Enroll permission, a certificate not valid for the usage, a template that does not exist, and a template not being issued to computers.
Prove the cause before changing anything
Every step in this section only reads.
On the server, in an elevated PowerShell session, list the Remote Desktop settings. Get-CimInstance accepts -Namespace and -ClassName:
Get-CimInstance -Namespace root/cimv2/TerminalServices -ClassName Win32_TSGeneralSetting |
Select-Object TerminalName, CertificateName, SSLCertificateSHA1Hash, SSLCertificateSHA1HashType, SecurityLayer
A good result for a server that already uses your CA is SSLCertificateSHA1HashType of 3 (or 2 if Group Policy enforces it) and a hash matching a certificate you know. A bad result is a type of 1, or a type of 0 ("Not valid"). Note the TerminalName value of the row that represents the network listener; you need it later.
Find the thumbprint of the certificate you intend to use in the Certificates snap-in for the computer account. Microsoft says the thumbprint "may be found using the Certificates MMC snap-in on the Details tab of the certificate properties page". Confirm its validity dates, that its subject or alternative names include the name users type, and that the issuing CA is trusted by the clients.
If Group Policy is involved, open the policy at Computer Configuration, Administrative Templates, Windows Components, Remote Desktop Services, Remote Desktop Session Host, Security. Read "Server Authentication Certificate Template". Microsoft's text says that if you enable it, "only certificates created by using the specified certificate template will be considered", and that you "must set the certificate template's attributes Template display name and Template name to the same value". It also says a certificate you select directly "will take precedence over this policy setting".
On a client, connect and read the warning's certificate details. This tells you the name and issuer the server is presenting.
Fix
Choose the route that matches how you run the estate.
Route 1: bind a certificate by thumbprint (one server, or a short list).
Obtain a certificate for the server's name from your CA. The Remote Desktop Session Host policy documentation says the template must give the certificate a Server Authentication enhanced key usage. Place it in the computer's certificate store, then read its thumbprint. Check that it shows a private key, with the form Microsoft's certificate-store page uses:
$certificate = Get-Item -Path 'Cert:\LocalMachine\My\<thumbprint>'
$certificate | Format-List DnsNameList, EnhancedKeyUsageList, HasPrivateKey, NotAfter, Subject, Thumbprint
HasPrivateKey should read True. If it reads False, binding that certificate cannot work.
Disruptive step: setting the hash changes which certificate every new Remote Desktop connection to this server is offered. The Microsoft class page does not say whether existing sessions or a restart are affected, so do this out of hours and keep a console or hypervisor session open. To back out, set SSLCertificateSHA1Hash to the previous value you recorded in the read-only step.
Set-CimInstance -Namespace root/cimv2/TerminalServices `
-Query "SELECT * FROM Win32_TSGeneralSetting WHERE TerminalName='<TerminalName from the read-only step>'" `
-Property @{SSLCertificateSHA1Hash='<thumbprint without spaces>'}
Set-CimInstance documents -Query, -Namespace and -Property together, and -WhatIf as a way to see what would be modified without changing it. Add -WhatIf for a first run.
Route 2: let Group Policy choose the certificate (many servers).
Risk: a policy change reaches every server in the scope of the GPO. Link it to a test organisational unit first. To back out, set the policy to Not Configured; servers return to the default self-signed certificate unless a certificate was selected directly.
Create or duplicate a certificate template with the Server Authentication enhanced key usage, grant the Remote Desktop servers' computer accounts Enroll permission, and publish the template on the CA.
Risk: a new published template and an Enroll grant let those computer accounts request certificates from your CA. Impact: a template with the wrong settings can issue certificates you did not intend. Back-out: unpublish the template from the CA and remove the Enroll grant; certificates already issued stay valid until they expire or are revoked.
Enable "Server Authentication Certificate Template" and enter the template name. Risk: enabling the policy reaches every server in the scope of the GPO. Back-out: set the policy to Not Configured. Microsoft documents that when more than one matching certificate exists, "the certificate that will expire latest and that matches the current name of the RD Session Host server will be selected", and that if none exists, the server "will issue a certificate enrollment request and will use the current certificate until the request is completed".
Clients that do not trust the CA. If only some computers warn, the certificate is fine and the trust is missing. Distribute the CA's root through your normal certificate distribution rather than clicking through the warning.
Risk: Microsoft's certificate-store page says adding a certificate to the Local Computer Trusted Root Certification Authorities store "changes the set of root certification authorities (CAs) that the computer trusts". Impact: every client that receives the root then trusts everything that CA issues. Back-out: send only to the clients that need it, record the root's thumbprint, and remove the certificate with that thumbprint from the same store to undo it.
Confirm the fix
Rerun the read-only query. SSLCertificateSHA1HashType should read 3 (or 2 under policy) and the hash should equal the thumbprint you chose. Then connect from a client that trusts your CA, using the name on the certificate, and confirm no warning appears. Microsoft's Event ID 1064 page describes a lock symbol in the connection bar when TLS is in use. Check the System and Remote Desktop event logs for a new Event ID 1064.
Example (illustrative): an administrator manages twelve Remote Desktop hosts named rds01 to rds12 in the CONTOSO domain. Each reports type 1. The administrator plans to bind a CA-issued certificate on each by thumbprint. Setting the hash and testing a new connection takes about 8 minutes per host (3 minutes to set, 5 minutes to test from a client). Twelve hosts at 8 minutes is 96 minutes, or 1 hour 36 minutes, so the work is booked as a single evening window rather than squeezed between calls. After the change each host reads type 3, and the connection to rds01.contoso.example opens with no warning from domain-joined clients.
What to watch afterwards
- Record each certificate's expiry date. A certificate that lapses brings the warning back on every connection. Schedule renewal well before that date.
- Watch for Event ID 1064 after a template or permission change.
- If you move to Group Policy selection, check that the template name and display name stay identical, as Microsoft requires.
- After any rebuild or restore of a server, read
SSLCertificateSHA1HashTypeagain. A server restored to a state before the change can return to the default.
Read next
Related articles you may want next.
- TroubleshootingRemote Desktop "An internal error has occurred": certificate, security layer and service checksA direct Remote Desktop connection fails with "An internal error has occurred" before or after you enter credentials. Rule out the network, test the security negotiation, then check the server's Remote Desktop certificate, key permissions and listener.Read article
- TroubleshootingRD Gateway Connection Failures: Certificate, CAP, RAP and Transport ChecksFind why RD Gateway connections fail: check the certificate name, read Gateway events 200/201/300/301/304, test CAP and RAP logic, central NPS timeouts, and TCP 443 / UDP 3391.Read article
- HostingRenew IIS TLS Certificates and Verify the Live EndpointMap TLS termination, renew the correct certificate and validate trust and hostname from real client paths before retiring the old certificate.Read article
Risks and limits
These commands have not been run or lab-tested.
The Group Policy and Event ID 1064 pages cited are archived documentation for Windows Server 2008 R2. Menu names and behaviour on current Windows Server releases can differ, so confirm the policy path in your own Group Policy editor. The WMI class page lists minimum supported server Windows Server 2008 and does not name later versions. The page does not state whether a restart or a service restart is needed after changing the hash.
Do not delete the self-signed certificate to force a switch; no cited page says it is safe. If connection attempts fail outright instead of showing a warning, the cause is a different fault (the message "An internal error has occurred"), which is not covered here.
Sources
- Win32_TSGeneralSetting class — Microsoft Learn, page dated 2020-12-11, accessed 18 November 2026
- Security (Remote Desktop Session Host Group Policy, Windows Server 2008 R2) — Microsoft Learn, page dated 2011-11-28, accessed 18 November 2026
- Event ID 1064 — Remote Desktop Services Authentication and Encryption — Microsoft Learn, page dated 2010-01-15, accessed 18 November 2026
- Get-CimInstance — Microsoft Learn, date not shown, accessed 18 November 2026
- Set-CimInstance — Microsoft Learn, date not shown, accessed 18 November 2026
- Manage Certificate Stores in Windows Server — Microsoft Learn, page dated 2026-10-02, accessed 18 November 2026
This article was originally published on .