# Enrollment templates count should be retrievable

Enrollment templates represent which certificate templates are available for users/computers to request through AD-integrated enrollment.

Source: https://maester.dev/docs/tests/AD-CFG-14

<!-- This file is generated by website/scripts/generate-test-docs.mjs. Do not edit manually. -->

<div class="test-byline"><div class="test-byline-avatars"><a class="test-byline-avatar test-byline-avatar--author" href="/contributors/soulemike" title="Michael Soule · Original author"><img src="https://github.com/soulemike.png" alt="Michael Soule" width="28" height="28" loading="lazy" decoding="async" /></a></div><div class="test-byline-meta"><span class="test-byline-text">Contributed by <a href="/contributors/soulemike">Michael Soule</a></span><a class="test-byline-link" href="/contributors">All contributors →</a></div></div>

<p class="test-part">Part of <a href="/docs/tests/ad">Active Directory</a> · Active Directory · Certificate Services · <a href="/docs/tests">All checks</a></p>

```powershell title="Run this check"
Invoke-Maester -TestId AD-CFG-14
```

## Overview

Enrollment templates represent which certificate templates are available for users/computers to request through AD-integrated enrollment. If unnecessary or risky templates are available for enrollment, an attacker may enroll for certificates that enable authentication, code-signing abuse, or access to privileged resources.

#### Control Type

**Operational**

#### Security Recommendation
- Keep the enrollment template set minimal and aligned with your approved PKI strategy.
- Validate enrollment permissions and autoenrollment settings for each template that is enabled.
- Remove templates from enrollment that are not required for business operations.
- Monitor for unexpected changes to the number of enrollment templates.

#### How the Test Works
- Identifies enrollment-capable configuration in AD and enumerates enrollment templates exposed via that configuration.
- Counts the number of available enrollment templates.
- Compares the count to an environment baseline and flags unexpected increases (new template exposure) or decreases (possible misconfiguration/incident).

#### Related Tests
- [Test-MtAdCertificateTemplatesCount](/docs/commands/Test-MtAdCertificateTemplatesCount): Broader view of templates defined in AD.
- [Test-MtAdEnrollmentCaCertificateDetails](/docs/commands/Test-MtAdEnrollmentCaCertificateDetails): Ensures the CAs behind enrollment are healthy and not expired.

## Details

<details>
<summary>Every attribute of this check</summary>

| Field | Value |
| --- | --- |
| Test ID | AD-CFG-14 |
| Severity | Info |
| Suite | Active Directory |
| Product | Active Directory |
| Feature | Certificate Services |
| Area | Infrastructure hardening |
| Resource type | CertificateAuthority |
| MITRE ATT&CK | None |
| PowerShell test | [Test-MtAdEnrollmentTemplatesCount](https://github.com/maester365/maester/blob/main/tests/ad/config/Test.AD-CFG-14.ps1) |
| Services | ActiveDirectory |
| Permissions | ActiveDirectory:Ldap:Configuration/*:ReadProperty |

</details>

## Source

- Test: [`tests/ad/config/Test.AD-CFG-14.ps1`](https://github.com/maester365/maester/blob/main/tests/ad/config/Test.AD-CFG-14.ps1)
- Documentation: [`tests/ad/config/Test.AD-CFG-14.md`](https://github.com/maester365/maester/blob/main/tests/ad/config/Test.AD-CFG-14.md)
