ADCS Cert Cleanup

G Vedavyas 0 Reputation points
2026-10-28T08:35:25.87+00:00

Hi everyone, Currently I'm assessing ADCS environment of one of my clients. They have not maintained the ADCS environment properly now they want me to perform the cleanup of the certificates. Could you please let me know what are the best practices to follow with minimal downtime of the environment.

Thanks!

Windows for business | Windows Server | Directory services | Certificates and public key infrastructure (PKI)
0 comments No comments

1 answer

Sort by: Most helpful
  1. Chance Maurice Niyonzima 825 Reputation points Independent Advisor
    2026-10-28T10:30:54.3333333+00:00

    Hello Vedavyas,

    Thank you for posting your question on the Microsoft Windows Forum!

    The most important finding is that your client's AD CS environment has not been actively maintained, and they are now looking to perform certificate cleanup. In this situation, the biggest risk is not deleting expired certificates, but accidentally removing certificates, templates, or CA objects that are still in active use.

    What this means

    For an AD CS cleanup, I would strongly recommend taking an inventory-first approach rather than deleting expired certificates immediately.

    The areas that should be assessed before any cleanup are:

    Enterprise CA and Subordinate CA hierarchy
    Certificate Templates
    Issued Certificates
    Revoked Certificates
    Auto-Enrollment Policies
    NDES/SCEP (if deployed)
    OCSP Responders (if deployed)
    CRL and AIA Distribution Points
    

    Highest-value first step

    Before removing anything, generate an inventory of:

    certutil -view
    certutil -CATemplates
    certutil -CAInfo
    

    and identify:

    • Expired certificates that are no longer referenced.
    • Certificate templates no longer issuing certificates.
    • Superseded templates.
    • Legacy templates using deprecated cryptography (e.g., SHA1, 1024-bit RSA).
    • Certificates associated with decommissioned servers.

    Recommended Cleanup Order

    To minimize downtime, I typically recommend:

    1. Inventory and document the environment.
    2. Review certificate templates and identify unused or duplicate templates.
    3. Review issued certificates and verify whether expired certificates are still associated with active systems.
    4. Clean up obsolete templates only after confirming no active enrollments rely on them.
    5. Review CRL/AIA paths and remove references to decommissioned infrastructure.
    6. Perform CA database maintenance (optional, depending on database growth).

    Avoid deleting:

    CA certificates
    CA private keys
    Active certificate templates
    CRL/AIA locations
    

    without first validating dependencies.

    Common Pitfall

    One of the most disruptive mistakes is removing:

    Certificate Templates

    simply because they appear unused. Auto-enrollment, VPN infrastructure, Wi-Fi authentication (802.1X), NPS, IIS, RDP, or device enrollment solutions often depend on templates that are rarely renewed but still operational.

    Microsoft References

    Before cleanup approach, it would be helpful to understand the scope of the PKI environment because the risk and downtime considerations differ significantly between deployments.

    Could you share:

    Whether this is an Enterprise CA or Standalone CA
    Whether auto-enrollment is currently in use
    The number of Certification Authorities (Root/Subordinate)
    Whether the environment is actively issuing certificates
    

    These details will help determine whether the focus should be on certificate cleanup, template cleanup, CA database maintenance, or broader PKI remediation.

    That will help determine the safest cleanup strategy and identify any areas where downtime risk is highest.

    I hope this answer has brought you useful information. If so, please click on Accept Answer and consider upvoting it. Doing so helps other community members identify useful solutions to similar issues.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.