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 certificate that shows no private key cannot prove the server's identity, so IIS, Remote Desktop and other services cannot use it. certutil -repairstore can restore the link between a certificate and a key pair that is still on the same machine, in the same user or machine context. It cannot create a key. If the certificate arrived as a .cer, .p7b or .sst file, or if the request was made on another computer, there is nothing on this server to link to.
Microsoft's own IIS page says the command "may not always succeed" and that you then need a certificate containing the private key, which means a PFX file or a fresh request.
What the error means
A certificate and its private key are separate objects. Microsoft's -repairstore description speaks of a "key association", and its error table words one failure as a certificate that "does not have a property that references a private key". Microsoft's pages do not describe the mechanism further, so treat a missing association as one possible cause among those in the table below.
Microsoft's certificate store page states that Import-Certificate "doesn't import a PFX/private key" and that Export-Certificate "exports only public certificate material." A .cer, .p7b or .sst file therefore never carries a key. A PFX can, and Microsoft says a PFX export "succeeds only when the included private keys are exportable."
The certreq -accept command is the other route. Microsoft says it "links the previously generated private key with the issued certificate and removes the pending certificate request from the system where the certificate is requested (if there's a matching request)". If there is no outstanding request in the user or machine context, you must name one with -user or -machine.
Three Microsoft error-table rows can appear in tools. 0x80092004 is "Cannot find object or property." 0x8009200A is "The certificate does not have a property that references a private key." 0x8009200B is "Cannot find the certificate and private key for decryption." Read the second as a statement about the certificate's properties.
Likely causes
| Cause | What you see | How to confirm |
|---|---|---|
Public-only import from a .cer, .p7b or .sst file |
HasPrivateKey is False and the Certificate dialog shows no private-key message |
Check the file type you imported, and ask where the certificate came from |
| Request was made on another computer, or in the other context (user instead of machine) | The certificate sits in one store; the key, if any, is elsewhere | Run certutil -key and certutil -user -key, and look in both stores |
| Key pair is present but the association property is missing | A key container is listed for the right context, yet the certificate shows no key | certutil -key lists a container for the machine, and the certificate still shows no key; the read-only checks cannot tell this apart from the other rows, so run -repairstore below and, if HasPrivateKey stays False, move on to the PFX or a new request |
| Certificate shows a key but the service cannot use it | HasPrivateKey is True, and the System log holds Schannel event 36870 |
Test as the service's runtime identity; check permissions on the key folder |
| The key never existed here, or is gone (rebuild, reimage, key not exportable at source) | Repair fails | No key container, no PFX, no pending request: the CA must issue a new certificate |
Prove the cause before changing anything
These checks only read.
1. Ask the store. Microsoft's store page gives this pattern. Replace THUMBPRINT with the real value:
$certificate = Get-Item -Path 'Cert:\LocalMachine\My\THUMBPRINT'
$certificate | Format-List DnsNameList, EnhancedKeyUsageList, HasPrivateKey, NotAfter, Subject, Thumbprint
Run it again against Cert:\CurrentUser\My. Microsoft notes that "A current-user certificate isn't automatically available to a service." A service reads the local-computer or service-account store, so a certificate with a key in the wrong store is a real failure.
2. Look at the dialog. In certlm.msc, open the certificate. The IIS page shows the Certificate dialog displaying a message that a private key corresponds to the certificate when one is attached. If the message is absent, the key is not linked.
3. List the keys on the machine. The certutil reference describes -key as listing "the keys stored in a key container", defaulting to machine keys, with -user for user keys.
certutil -key
certutil -user -key
The reference does not print sample output. Compare the listing with the certificate's request history: a key container created around the time of the request is a lead, but nothing in Microsoft's pages ties a container name to a certificate by sight.
4. Dump the stored certificate.
certutil -store My THUMBPRINT
The syntax is certutil [options] -store [CertificateStoreName [CertId [OutputFile]]], where the identifier can be a thumbprint. The page does not describe the output, so compare the result with a certificate you know works on a similar server and look for lines about a key container or provider.
5. Read the System log for Schannel 36870. Microsoft's IIS page shows "A fatal error occurred when attempting to access the SSL server credential private key" with codes 0x80090016 or 0x8009001a. A key that is present but unreachable points to permissions or corruption, not to a missing link.
6. Find out how the certificate arrived. A certificate sent as an attachment or download link may be the public part only. Ask for the file type and the machine the request came from.
Fix
Public-only import. Obtain the PFX from the machine that made the request, or have the CA reissue against a request made here. Import it with Microsoft's cmdlet. Preview first:
$credential = Get-Credential -UserName 'Enter PFX password' -Message 'Enter the PFX password'
Import-PfxCertificate -FilePath '.\server.pfx' -CertStoreLocation 'Cert:\LocalMachine\My' -Password $credential.Password -WhatIf
Remove -WhatIf after the preview. Risk: this adds a certificate and a private key to the machine store. Microsoft says the key imports as non-exportable by default and advises against -Exportable unless the design needs it. To back out, delete the certificate by thumbprint after confirming nothing is bound to it; the removal itself cannot be undone from the store, so keep the PFX.
Pending request on this machine. If the CA returned a response to a request created here, link it:
certreq -accept -machine certnew.cer
Use -user if the request was made in the user context. Disruptive step: this installs the certificate and removes the matching pending request from the system. There is no way to restore the pending request, so keep certnew.cer and the original .req file.
Key present, link missing. This is the case -repairstore addresses. Microsoft describes it as "Repairs a key association or update certificate properties or the key security descriptor."
certutil -repairstore My THUMBPRINT
Disruptive step: the command writes properties on the stored certificate. Give it only the store name and the thumbprint. The syntax also accepts a property file or a security descriptor, both of which change the certificate's properties or the key's permissions, so do not add them unless a vendor requires it. Before running it, export the public certificate with Export-Certificate and note the current properties. The certutil page documents no undo. Type the verb with no space after the dash, as the reference syntax shows. For a certificate in a current-user store, add -user (certutil -user -repairstore My THUMBPRINT). If it fails, move on to a PFX or a new request.
Key present but unusable. Check permissions on the folder that holds machine keys. Microsoft's MachineKeys page says it applies to Windows Server 2003, and lists the defaults as Administrators (Full Control) and Everyone (Special), both "This folder only". Treat that as a baseline for comparison, not a procedure for current versions. Microsoft's store page says to test the certificate as the application's runtime identity and not to "grant broad key access merely to bypass an application error." Risk: a permission change on that folder affects every key in it. Record the existing permissions first; restoring them by hand is the only way back.
Key gone. Create a new request on the machine that will use the certificate. Microsoft's certreq reference defines an INF file with these keys. MachineKeySet = TRUE makes the key belong to the machine, not to the administrator who runs the command:
[NewRequest]
Subject = "CN=app01.contoso.com"
KeyLength = 2048
KeySpec = 1
MachineKeySet = TRUE
[RequestAttributes]
CertificateTemplate=WebServer
certreq -new requestconfig.inf certrequest.req
certreq -submit certrequest.req certnew.cer
certreq -accept -machine certnew.cer
Microsoft recommends that private keys "shouldn't be exportable"; add Exportable = TRUE only when several computers must share the key. Risk: a new key pair means a new certificate with a new thumbprint. Bindings that name the old thumbprint keep pointing at the old certificate until you change them. To back out, rebind the old thumbprint if the old certificate is still valid.
Confirm the fix
Run the HasPrivateKey query again and confirm it returns True. Then test as the real identity: browse to the service from a client, and check that no Schannel 36870 event follows. The store page says HasPrivateKey "confirms an associated private key, not that a service or application can use it."
Example (illustrative): a colleague requests a certificate for app01.contoso.com on app02 on 4 November and sends the issued app01.cer to the administrator of app01. The administrator imports it into the Local Computer store on app01. The certificate is valid from 10 November 2026 to 10 November 2027, which is 365 days. HasPrivateKey shows False, and certutil -repairstore My THUMBPRINT on app01 makes no difference, because the key pair was created on app02. The administrator checks app02, finds the key was not exportable, and asks for a new request created on app01 with certreq -new.
What to watch afterwards
- Record, at issue time, which machine generated each request, and whether the key is exportable.
- Store PFX files only where access is controlled. Microsoft says to keep a PFX private key under approved access controls.
- Alert on certificates in the machine store whose
HasPrivateKeyis False and whose purpose is server authentication. - Test restores of a server by checking
HasPrivateKeyon each service certificate afterwards.
Read next
Related articles you may want next.
- 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
- Backup & RecoveryTPM keys, DPAPI secrets and certificates: what stays behind when a Windows server's hardware or installation changesDistinguish TPM-bound private keys, DPAPI secrets and exportable certificates when planning Windows recovery onto replacement hardware.Read article
- 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
Risks and limits
These commands have not been run or lab-tested.
Microsoft's pages do not show the output of certutil -key or -store, so the checks above ask you to compare against a working machine. The MachineKeys page describes Windows Server 2003, and the IIS page is dated 2024-12-03. Keys held in a TPM or on a smart card are not covered; the steps here address keys kept in the machine's key folders. Deleting a certificate or accepting a response cannot be reversed from the store.
Sources
- Manage Certificate Stores in Windows Server — Microsoft Learn, page dated 2026-10-02, accessed 18 November 2026
- certutil — Microsoft Learn, page dated 2025-05-01, accessed 18 November 2026
- certreq — Microsoft Learn, page dated 2025-09-02, accessed 18 November 2026
- Import-PfxCertificate (pki) — Microsoft Learn, date not shown, accessed 18 November 2026
- Troubleshooting SSL related issues (Server Certificate) — Microsoft Learn, page dated 2024-12-03, accessed 18 November 2026
- Default permissions for MachineKeys folders — Microsoft Learn, page dated 2026-02-12, accessed 18 November 2026
- COM Error Codes (Security and Setup) — Microsoft Learn, page dated 2021-03-22, accessed 18 November 2026
This article was originally published on .