This is a revision of KB article 889250.
Since the process (with exception to role removal) is the same for Windows Server 2008 and Windows Server 2008 R2 I would like to:
When you uninstall a certification authority (CA), the certificates that were issued by the CA are typically still outstanding. If the outstanding certificates are processed by the various Public Key Infrastructure client computers, validation will fail, and those certificates will not be used.
This article describes how to revoke outstanding certificates and how to complete various other tasks that are required to successfully uninstall a CA. Additionally, this article describes several utilities that you can use to help you remove CA objects from your domain.
This step-by-step article describes how to decommission a Microsoft Windows enterprise CA, and how to remove all related objects from the Active Directory directory service.
Depending from CA level in CA hierarchy different steps can be used to revoke all issued certificates. The following procedure should be used if your CA is root CA (with self-signed certificate):
If your CA is intermediate (or subordinate) CA you can revoke CA certificate at issuer:
Note The lifetime of the Certificate Revocation List (CRL) should be longer than the lifetime that remains for certificates that have been revoked.
By default, an enterprise CA does not store certificate requests. However, an administrator can change this default behavior. To deny any pending certificate requests, follow these steps:
(1)Microsoft Base Cryptographic Provider v1.0: 1a3b2f44-2540-408b-8867-51bd6b6ed413 MS IIS DCOM ClientSYSTEMS-1-5-18 MS IIS DCOM Server Windows2000 Enterprise Root CA MS IIS DCOM ClientAdministratorS-1-5-21-436374069-839522115-1060284298-500 afd1bc0a-a93c-4a31-8056-c0b9ca632896 Microsoft Internet Information Server NetMon MS IIS DCOM ClientAdministratorS-1-5-21-842925246-1715567821-839522115-500 (5)Microsoft Enhanced Cryptographic Provider v1.0: 1a3b2f44-2540-408b-8867-51bd6b6ed413 MS IIS DCOM ClientSYSTEMS-1-5-18 MS IIS DCOM Server Windows2000 Enterprise Root CA MS IIS DCOM ClientAdministratorS-1-5-21-436374069-839522115-1060284298-500 afd1bc0a-a93c-4a31-8056-c0b9ca632896 Microsoft Internet Information Server NetMon MS IIS DCOM ClientAdministratorS-1-5-21-842925246-1715567821-839522115-500
certutil -delkey CertificateAuthorityName
certutil -delkey "Windows2000 Enterprise Root CA"
When Microsoft Certificate Services is installed on a server that is a member of a domain, several objects are created in the configuration container in Active Directory. These objects are the following:
When the CA is uninstalled, only the pKIEnrollmentService object is removed. This prevents clients from trying to enroll against the decommissioned CA. The other objects are retained because certificates that are issued by the CA are probably still outstanding. These certificates must be revoked by following the procedure in the "Step 1: Revoke all active certificates that are issued by the enterprise CA" section.
For Public Key Infrastructure (PKI) client computers to successfully process these outstanding certificates, the computers must locate the Authority Information Access (AIA) and CRL distribution point paths in Active Directory. It is a good idea to revoke all outstanding certificates, extend the lifetime of the CRL, and publish the CRL in Active Directory. If the outstanding certificates are processed by the various PKI clients, validation will fail, and those certificates will not be used.
If it is not a priority to maintain the CRL distribution point and AIA in Active Directory, you can remove these objects. Do not remove these objects if you expect to process one or more of the formerly active digital certificates.
Note You should not remove certificate templates from Active Directory until after you remove all CA objects in the Active Directory forest.
To remove all Certification Services objects from Active Directory, follow these steps:
ldifde -r "cn=CACommonName" -d "CN=Public Key Services,CN=Services,CN=Configuration,DC=ForestRoot,DC=com" -f output.ldf
In this command, CACommonName represents the Name value that you determined in step 1. For example, if the Name value is "CA1 Contoso," type the following:
ldifde -r "cn=CA1 Contoso" -d "cn=public key services,cn=services,cn=configuration,dc=contoso,dc=com” -f remainingCAobjects.ldf
ldifde -i -f remainingCAobjects.ldf
cd %windir%\system32
regsvr32 /i:i /n /s certcli.dll
To delete the certificate templates, follow these steps.
After you delete the CA objects, you have to delete the CA certificates that are published to the NtAuthCertificates object. Use either of the following commands to delete certificates from within the NTAuthCertificates store:
certutil -viewdelstore "ldap:///CN=NtAuthCertificates,CN=Public Key Services,CN=Services,CN=Configuration,DC=ForestRoot,DC=com?cACertificate?base?objectclass=certificationAuthority" certutil -viewdelstore "ldap:///CN=NtAuthCertificates,CN=Public Key Services,CN=Services,CN=Configuration,DC=ForestRoot,DC=com?cACertificate?base?objectclass=pKIEnrollmentService
Note You must have Enterprise Administrator permissions to perform this task.
The -viewdelstore action invokes the certificate selection UI on the set of certificates in the specified attibute. You can view the certificate details. You can cancel out of the selection dialog to make no changes. If you select a certificate, that certificate is deleted when the UI closes and the command is fully executed.
Use the following command to see the full LDAP path to the NtAuthCertificates object in your Active Directory:
certutil -store -? | findstr "CN=NTAuth"
When Certification Services is uninstalled, the CA database is left intact so that the CA can be re-created on another server.
To remove the CA database, delete the %systemroot%\System32\Certlog folder.
After the CA is uninstalled, the certificates that were issued to domain controllers must be removed.
To remove certificates that were issued to the Windows Server 2000 domain controllers, use the Dsstore.exe utility from the Microsoft Windows 2000 Resource Kit.
To remove certificates that have been issued to the Windows Server 2000 domain controllers, follow these steps:
To remove certificates that were issued to the Windows Server 2003 domain controllers, follow these steps.
Important Do not use this procedure if you are using certificates that are based on version 1 domain controller templates.
Certutil.exe tries to validate all the DC certificates that are issued to the domain controllers. Certificates that do not validate are removed.
To force application of the security policy, follow these steps:
J Stangroome edited Revision 16. Comment: Fixed viewdelstore commands
Lewis Roberts edited Revision 14. Comment: Made the GUI option for removing NTAuthCertificates more obviously an alternative method than using certutil
Fernando Lugão Veltem edited Revision 13. Comment: added tags
Lewis Roberts edited Revision 12. Comment: Added an alternative GUI method to remove the certificate from the NtAuthCertificates container in Step 7.
FZB edited Revision 10. Comment: formatting
FZB edited Revision 9. Comment: typo
Pantelis44999 edited Revision 8. Comment: Added How To Template message
Kurt L Hudson edited Revision 7. Comment: Removed flag that this is under review and changed revision notes. I am about to blog this article.
Vadims Podans edited Revision 5. Comment: recreated HTML code from scratch.
Vadims Podans edited Revision 4. Comment: added template "work in progress"
Kurt L Hudson edited Original. Comment: Updated headings, set TOC, ready for some revisions
Vadims Podans edited Revision 3. Comment: updated step 1. It is not a good idea to revoke all certificates on intermediate CA because final CRL may become extremely large.
Is Step 2 worded correctly? Should the length of time of the CRL publication interval be increased? So, for example, if it's currently set at 1 week, it should be set to 1 year? Or should it be shorter? 30 minutes instead of 1 week for instance. Why is this part of the process important?
Yes, CRL validity must be increased.
After setting up an Enterprise CA in order to decommission it following this guide, I am not able to proceed past Step 5. The step suggests that issuing the command certutil -key will give a list of CSPs and the name of your CA. This is not true of Windows Server 2008 R2. An example of the output obtained from the command certutil -key from a Windows Server 2008 R2 Enterprise Root CA is:
Microsoft Strong Cryptographic Provider:
le-DomainController-2b43a7e4-deee-4569-b2fd-df5a9be0fe8d
3208ae7444227e7f53ad437ef8992f65_55eda213-55b3-42f6-b40d-23fe7a59e502
AT_KEYEXCHANGE
iisConfigurationKey
6de9cb26d2b98c01ec4e9e8b34824aa2_55eda213-55b3-42f6-b40d-23fe7a59e502
iisWasKey
76944fb33636aeddb9590521c2e8815a_55eda213-55b3-42f6-b40d-23fe7a59e502
MS IIS DCOM Server
7a436fe806e483969f48a894af2fe9a1_55eda213-55b3-42f6-b40d-23fe7a59e502
AT_KEYEXCHANGE, AT_SIGNATURE
Microsoft Internet Information Server
c2319c42033a5ca7f44e731bfd3fa2b5_55eda213-55b3-42f6-b40d-23fe7a59e502
NetFrameworkConfigurationKey
d6d986f09a1ee04e24c949879fdb506c_55eda213-55b3-42f6-b40d-23fe7a59e502
CertUtil: -key command completed successfully.
I have attempted a significant number of other commands but with no success. What are the alternative methods for Step 5?