# DC operating system count should be retrievable

Knowing the operating systems running on your domain controllers is important for:

Source: https://maester.dev/docs/tests/AD-DC-07

<!-- 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 · Domain controllers · <a href="/docs/tests">All checks</a></p>

```powershell title="Run this check"
Invoke-Maester -TestId AD-DC-07
```

## Overview

Knowing the operating systems running on your domain controllers is important for:

- **Lifecycle management**: Identifying DCs running end-of-life operating systems
- **Security patching**: Ensuring all DCs receive security updates
- **Feature availability**: Determining which AD features are available
- **Standardization**: Reducing OS variety for easier management
- **Upgrade planning**: Identifying DCs that need to be upgraded

Running outdated operating systems on domain controllers poses security risks as they may not receive security patches.

#### Control Type

**Operational**

#### Security Recommendation

- Standardize on a supported Windows Server version for all DCs
- Plan to upgrade DCs running end-of-life operating systems
- Ensure all DCs are receiving security updates
- Consider running the latest Windows Server version for new DCs

Current Windows Server support status:
- Windows Server 2022: Supported
- Windows Server 2019: Supported
- Windows Server 2016: Supported
- Windows Server 2012 R2: Extended support ended October 2023
- Windows Server 2012: Extended support ended October 2023
- Earlier versions: Not supported

#### How the Test Works

This test retrieves the OperatingSystem attribute from all domain controllers and counts the unique OS versions in use.

#### Related Tests

- `Test-MtAdDcOperatingSystemDetails` - Detailed OS distribution breakdown
- `Test-MtAdDomainControllerCount` - Total DC count

#### Related links

- [Microsoft Learn: Windows Server release information](https://learn.microsoft.com/windows-server/get-started/windows-server-release-info)
- [ANSSI Active Directory checkpoints: DC/RODC with an obsolete operating system](https://www.cert.ssi.gouv.fr/uploads/ad_checklist.html#vuln_dc_obsolete)

## Details

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

| Field | Value |
| --- | --- |
| Test ID | AD-DC-07 |
| Severity | Info |
| Suite | Active Directory |
| Product | Active Directory |
| Feature | Domain controllers |
| Area | Infrastructure hardening |
| Resource type | DomainController |
| MITRE ATT&CK | None |
| PowerShell test | [Test-MtAdDcOperatingSystemCount](https://github.com/maester365/maester/blob/main/tests/ad/domain-controller/Test.AD-DC-07.ps1) |
| Services | ActiveDirectory |
| Permissions | ActiveDirectory:Ldap:nTDSDSA:ReadProperty |

</details>

## Source

- Test: [`tests/ad/domain-controller/Test.AD-DC-07.ps1`](https://github.com/maester365/maester/blob/main/tests/ad/domain-controller/Test.AD-DC-07.ps1)
- Documentation: [`tests/ad/domain-controller/Test.AD-DC-07.md`](https://github.com/maester365/maester/blob/main/tests/ad/domain-controller/Test.AD-DC-07.md)
