Skip to content

How to Install an Enterprise Root Certificate Authority with PowerShell Print

  • 0

Applies to: Windows Server 2019, Windows Server 2022 and Windows Server 2025, subject to the workload and edition requirements below.

Choose an enterprise root CA with its trust consequences understood

An Enterprise Root Certification Authority creates a root of trust integrated with Active Directory. It can issue certificates through templates and publish directory-related PKI information. A single online enterprise root is straightforward to operate, but its signing key remains exposed to the operational environment that also handles enrollment. Compromise of that root key affects every relying system that trusts it. Decide whether an offline standalone root with an enterprise subordinate is more appropriate before installation.

This guide shows a new, deliberately chosen enterprise-root deployment on a dedicated domain-member server. It is not a migration, a replacement for an existing CA or an instruction to create a new root merely because enrollment is failing. A CA name and key are long-lived identities. Reinstalling a CA with the same friendly name does not recreate the same trust or make existing issued certificates recoverable.

Plan the PKI before generating the root key

Define certificate purposes, relying systems, issuance approval, permitted enrollment groups, certificate validity and revocation policy. Select cryptographic algorithms and key protection from interoperability and security requirements. The RSA 4096 and SHA-256 example below is a conventional illustrative choice, not a substitute for a cryptographic policy or an HSM design. If a hardware security module is required, configure and validate its provider and recovery process first.

Choose a stable CA common name distinct from the server’s hostname and a server name that will not be casually changed after installation. Plan CA database and log placement, protected backups, key recovery custody and incident response. Avoid installing the CA on a domain controller or a general-purpose public application server. Restrict interactive administration and patching access to the people who operate the PKI.

Design CRL Distribution Point and Authority Information Access locations before issuing production certificates. Clients must retrieve current revocation data throughout the lifetime of issued certificates, including before a VPN or wireless connection exists. Use stable reachable publication names rather than assuming the CA’s own hostname will remain online forever. Changing the CA settings later does not rewrite URLs inside certificates already issued.

Confirm directory permissions and prepare the host

Use a supported, patched Windows Server joined to the intended AD domain with healthy DNS, time and directory connectivity. Enterprise CA installation requires the appropriate forest/directory permissions as well as local administration. Use an approved privileged installation identity and remove routine dependency on that high privilege after deployment. Do not make a service account broadly privileged to compensate for an installation-permission error.

Get-ComputerInfo | Select-Object CsName,WindowsProductName,OsBuildNumber,CsDomain
Get-WindowsFeature ADCS-Cert-Authority
Get-Volume | Select-Object DriveLetter,FileSystemLabel,SizeRemaining,Size
Resolve-DnsName 'corp.example'

If using CAPolicy.inf, place the reviewed file in the Windows directory before configuring the CA. Its contents influence initial certificate and policy behaviour and must match the hierarchy design. Do not copy a policy file from an unrelated two-tier tutorial without understanding each setting. Confirm the selected database and log paths are dedicated and backed by the intended storage before the CA configuration step.

Install the role service and configure the new CA

Install the Certification Authority role service with management tools. This does not require adding Web Enrollment, online responders or enrollment web services unless the design specifically calls for them. Extra enrollment endpoints create additional authentication and exposure considerations and should not be installed by habit.

Install-WindowsFeature -Name ADCS-Cert-Authority -IncludeManagementTools
$params = @{
    CAType = 'EnterpriseRootCA'
    CACommonName = 'CORP-Root-CA'
    CryptoProviderName = 'RSA#Microsoft Software Key Storage Provider'
    KeyLength = 4096
    HashAlgorithmName = 'SHA256'
    ValidityPeriod = 'Years'
    ValidityPeriodUnits = 10
    DatabaseDirectory = 'D:\CA\Database'
    LogDirectory = 'D:\CA\Logs'
}
Install-AdcsCertificationAuthority @params

The ten-year root validity is illustrative and must fit the organization’s lifecycle and renewal plan. Review the confirmation before key generation. Do not use overwrite-existing-key, database or directory-object switches as a way around an unexpected conflict. A conflict can indicate an existing CA identity or incomplete migration whose recovery requires preserving the old key and database.

Configure publication and restrict issuance before onboarding

Open Certification Authority and review CA properties, especially Extensions, the configured CDP and AIA locations, and the publication flags associated with them. Configure the reviewed endpoints before issuing production leaf certificates. Publish the CA certificate and current CRL to their actual distribution locations and verify retrieval from representative relying systems, not only from the CA itself.

Get-Service CertSvc
certutil -getreg CA\CRLPublicationURLs
certutil -getreg CA\CACertPublicationURLs
certutil -CRL
certutil -ca.cert 'C:\AdminEvidence\CORP-Root-CA.cer'

Create and protect the evidence directory first. Generating a CRL file is not proof that an HTTP distribution server now serves it. Check the transferred file, validity and endpoint availability. Review the templates currently enabled for issuance and their enrollment permissions. Publish only approved templates and avoid broad requester-supplied identities or authentication certificates without a controlled enrollment model. Keep administrative enrollment from becoming an unreviewed shortcut to a powerful certificate.

Validate trust, enrollment and revocation separately

Check that CertSvc runs and that the CA interface responds. Verify the root certificate’s subject, public-key algorithm, validity and self-signed chain. Confirm the intended domain and non-domain clients trust the root through their approved distribution mechanism. Do not install trust broadly on an unmanaged client merely to suppress a warning without establishing ownership of that device.

certutil -config 'CA01.corp.example\CORP-Root-CA' -ping
certutil -dump 'C:\AdminEvidence\CORP-Root-CA.cer'
# On a representative relying client, inspect an issued pilot certificate:
# certutil -urlfetch -verify 'C:\Pilot\pilot.cer'

Enroll one approved pilot certificate through the intended template and verify its identity, purposes, chain, private-key location and access. Confirm its AIA/CDP URLs are the planned ones. Test revocation and publication using a disposable pilot certificate and a client verification path. A successful enrollment proves issuance, while a successful chain and revocation check establishes a different set of dependencies. Record both.

Establish recovery and ongoing PKI operations

Back up the CA database, private keys and certificates, registry configuration, CAPolicy.inf and enabled-template inventory through the CA backup procedure. Protect backup passwords separately and test a supported isolated recovery process. A server image without known key recovery and CA identity handling is not a complete PKI recovery plan. If keys are non-exportable in an HSM, use its documented backup and restoration process.

Monitor CRL publication and expiry, CA certificate renewal, service health, disk capacity and security events. Define who approves template changes and who can issue or manage certificates. For authentication certificates, account for current AD strong certificate-mapping requirements rather than relying on old weak-name mapping guidance. Certificate renewal, key rollover and decommissioning need plans long before the root’s last valid day.

Diagnose failures and understand rollback limits

For installation errors, preserve the exact setup output and CA installation logs, confirm directory permissions and connectivity, and check for existing CA objects or keys. For enrollment denial, inspect the request disposition, template publication, template ACL and requester identity. For validation failure, inspect trust, time, certificate purposes and actual revocation retrieval. Restarting CertSvc does not repair every failed issuance or stale CRL.

Before any certificates are issued or trust distributed, a new unsuccessful deployment may be removed through a controlled cleanup of its own objects. Once certificates exist, uninstalling the role does not revoke them, remove all trust or keep revocation endpoints available. Decommissioning is a PKI lifecycle operation involving relying systems, revocation and publication retention. Preserve the original signing key and records until the approved retirement process establishes what must remain verifiable.

Related guidance and official references

Design an offline standalone root; Publish a certificate template; Revoke certificates and publish a CRL; Back up the CA.


Was this answer helpful?

« Back