Installing Active Directory Certificate Services (AD CS) on Windows Server 2025 & 2022: Enterprise PKI Runbook

In modern enterprise identity architectures, an internal Public Key Infrastructure (PKI) is no longer just for issuing web server SSL certificates. With Microsoft enforcing phishing-resistant authentication, Certificate-Based Authentication (CBA) in Microsoft Entra ID, smart cards, and certificate-driven automation in Exchange Online, Active Directory Certificate Services (AD CS) serves as the bedrock of zero-trust security.

Deploying an Enterprise Certificate Authority on modern Windows Server (2025 or 2022) requires adhering to modern cryptographic standards: discarding obsolete SHA-1 hashing, implementing modern Key Storage Providers (KSP) rather than legacy CryptoAPI CSPs, and configuring robust CRL Distribution Points (CDP) and AIA paths.

In this updated runbook, we walk through the step-by-step deployment of an Enterprise Certificate Authority using automated PowerShell cmdlets and secure best practices.


Enterprise PKI Architecture: The Modern Two-Tier Model

In a production enterprise deployment, never install an Enterprise Root CA directly on a domain controller or expose a Root CA online. The industry standard is a Two-Tier PKI Hierarchy:

  1. Tier 1: Standalone Offline Root CA: A non-domain-joined, air-gapped machine kept offline. It signs the subordinate CA certificate and publishes a long-lived Certificate Revocation List (CRL).
  2. Tier 2: Enterprise Issuing Subordinate CA: A domain-joined server integrated with Active Directory. It issues client authentication certificates, smart card logon certificates, and Entra ID CBA certificates based on AD CS Certificate Templates.

(For lab and staging environments, an Enterprise Root CA can be deployed directly to demonstrate end-to-end enrollment workflows).

Modern Active Directory Certificate Services (AD CS) Hierarchy Tier 1: Offline Root CA • Air-Gapped / Non-Domain • 4096-bit RSA / SHA-256 • Validity: 10 - 20 Years • Signs Subordinate CA only ✔ Maximum Key Protection • Powered off when not signing Tier 2: Issuing Subordinate CA • Domain-Joined Enterprise CA • KSP (Software / HSM) • Validity: 5 Years • Certificate Templates Engine ✔ Auto-Enrollment enabled • CDP & AIA Web Publishing Enterprise Consumers • Entra ID CBA (Smartcards) • Exchange Online App Auth • Domain Controller Kerberos • Wi-Fi & VPN 802.1X • S/MIME Email Signing • TLS Web Server Auth Security Mandates for Modern AD CS: 1. Cryptography: Strictly use SHA-256 or SHA-384 with RSA 4096-bit (Root) and 2048/4096-bit (Issuing). 2. Provider Type: Choose Key Storage Provider (KSP) to support modern CNG and Hardware Security Modules (HSM). 3. Hardening: Disable vulnerable legacy templates (ESC1 - ESC8) to prevent domain privilege escalation attacks.

Phase 1: Installing the AD CS Server Roles via PowerShell

On Windows Server 2025 or 2022, avoid tedious Server Manager wizards. Open an elevated PowerShell prompt and install the AD CS role, Certification Authority management tools, and Web Enrollment:

POWERSHELL
# Install Active Directory Certificate Services and Management Tools
Install-WindowsFeature `
    -Name "AD-Certificate", "ADCS-Cert-Authority", "ADCS-Web-Enrollment", "RSAT-ADCS-Mgmt" `
    -IncludeManagementTools

# Verify installed features
Get-WindowsFeature | Where-Object { $_.Name -like "*ADCS*" -and $_.Installed }

Phase 2: Configuring the Enterprise Root / Issuing CA

Once binaries are installed, execute the post-installation configuration using Install-AdcsCertificationAuthority.

Enterprise Root CA Deployment (Lab / Standalone Model)

POWERSHELL
# Parameters for modern cryptographic configuration
$CaConfig = @{
    CAType             = "EnterpriseRootCA"
    CryptoProviderName = "RSA#Microsoft Software Key Storage Provider" # Modern KSP
    HashAlgorithmName  = "SHA256"                                    # Zero SHA-1
    KeyLength          = 4096                                        # 4096-bit RSA
    CACommonName       = "LAB365-Root-CA"
    ValidityPeriod     = "Years"
    ValidityPeriodUnits= 10
    DatabaseLocations  = "C:\Windows\System32\CertLog"
    LogLocations       = "C:\Windows\System32\CertLog"
    OverwriteExistingKey = $false
}

Install-AdcsCertificationAuthority @CaConfig -Verbose

Subordinate CA Deployment (Production Two-Tier Model)

For an Enterprise Subordinate CA, generate a Certificate Signing Request (CSR) to be signed by your offline Root CA:

POWERSHELL
# Subordinate CA configuration
$SubCaConfig = @{
    CAType             = "EnterpriseSubordinateCA"
    CryptoProviderName = "RSA#Microsoft Software Key Storage Provider"
    HashAlgorithmName  = "SHA256"
    KeyLength          = 4096
    CACommonName       = "LAB365-Issuing-CA01"
    OutputFileName     = "C:\Certs\LAB365-Issuing-CA01.req"
}

Install-AdcsCertificationAuthority @SubCaConfig -Verbose

Phase 3: Post-Installation Hardening & URL Path Configuration

A Certificate Authority cannot function properly without accessible AIA (Authority Information Access) and CDP (CRL Distribution Point) endpoints. If clients cannot verify certificate revocation via HTTP, certificate validation fails across Entra ID, VPNs, and Exchange Online.

1. Configure CDP (CRL Distribution Point)

Configure clean HTTP distribution points rather than legacy LDAP paths:
POWERSHELL
# Define Web CRL Distribution Point
$CrlHttpUrl = "http://pki.lab365.in/pki/<CaName><CRLNameSuffix><DeltaCRLAllowed>.crl"

certutil -setreg CA\CRLPublicationURLs "1:C:\Windows\system32\CertSrv\CertEnroll\%3%8%9.crl\n65:$CrlHttpUrl"

2. Configure AIA (Authority Information Access)

Publish the CA's public certificate (.crt) for chain-building:
POWERSHELL
# Define Web AIA URL
$AiaHttpUrl = "http://pki.lab365.in/pki/<CaName><CertificateName>.crt"

certutil -setreg CA\CACertPublicationURLs "1:C:\Windows\system32\CertSrv\CertEnroll\%1_%3%4.crt\n2:$AiaHttpUrl"

3. Adjust CRL Overlap and Publication Intervals

POWERSHELL
# Set Base CRL publication to 7 days with a 24-hour overlap
certutil -setreg CA\CRLPeriodUnits 7
certutil -setreg CA\CRLPeriod "Days"
certutil -setreg CA\CRLDeltaPeriodUnits 1
certutil -setreg CA\CRLDeltaPeriod "Days"
certutil -setreg CA\CRLOverlapUnits 24
certutil -setreg CA\CRLOverlapPeriod "Hours"

# Restart the CertSvc service to commit changes
Restart-Service CertSvc

# Force immediate CRL publication
certutil -CRL

Phase 4: Deploying Certificates for Entra ID & Exchange Online

Once your CA is operational, you can leverage it across Microsoft 365 services:

  1. Microsoft Entra ID Certificate-Based Authentication (CBA):

Export the Root CA public certificate (certutil -ca.cert RootCA.cer) and upload it to the Microsoft Entra admin center under Protection > Authentication methods > Certificate-based authentication. Review our guide on Migrating Exchange ActiveSync Direct CBA to Entra ID CBA.

  1. Exchange Online Application Authentication:

Issue a client authentication certificate to authenticate daemon scripts via Microsoft Graph without passwords. Review our runbook on Connecting to Exchange Online using Certificate Authentication.


Summary Checklist

ComponentModern StandardLegacy Pitfall
Hash AlgorithmSHA-256 or SHA-384SHA-1 (Cryptographically broken)
ProviderMicrosoft Software Key Storage Provider (KSP)CryptoAPI CSP
Root Key Length4096-bit RSA1024-bit or 2048-bit
Revocation PathsHigh-availability HTTP Web URLsInternal LDAP-only paths (Unreachable outside domain)
Architecture2-Tier (Offline Root + Online Issuing)Single-Tier Root on Domain Controller