# OU empty details should be retrievable

Understanding which specific Organizational Units are empty is essential for directory maintenance and cleanup efforts.

Source: https://maester.dev/docs/tests/AD-OU-05

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

```powershell title="Run this check"
Invoke-Maester -TestId AD-OU-05
```

## Overview

Understanding which specific Organizational Units are empty is essential for directory maintenance and cleanup efforts. This detailed view helps administrators:

- **Plan cleanup activities**: Identify specific OUs that can be evaluated for deletion
- **Assess creation dates**: Determine if empty OUs are recent (possibly in use) or old (likely abandoned)
- **Coordinate with teams**: Share specific OU names with relevant administrators for verification
- **Track cleanup progress**: Document which empty OUs have been reviewed and acted upon

The detailed list enables targeted cleanup efforts rather than broad, unfocused maintenance activities.

#### Control Type

**Operational**

#### Security Recommendation

Use this detailed information to conduct a systematic review of empty OUs:

1. **Review with stakeholders**: Share the list with department administrators who may know if an OU is needed
2. **Check creation dates**: Older empty OUs are more likely candidates for deletion
3. **Verify Group Policy links**: Empty OUs with linked GPOs may still serve a purpose
4. **Document decisions**: Record why certain empty OUs are retained
5. **Schedule deletions**: Plan removal of confirmed-unused OUs during maintenance windows

Establish a process where new OUs are documented at creation time to prevent future accumulation of empty, undocumented containers.

#### How the Test Works

This test retrieves all Organizational Units from Active Directory and:
- Identifies OUs with no user, group, or computer objects
- Lists each empty OU with its name, creation date, and distinguished name
- Provides a complete inventory of empty containers for cleanup planning

#### Related Tests

- `Test-MtAdOuEmptyCount` - Provides count summary of empty OUs
- `Test-MtAdOuStaleCount` - Identifies OUs not modified since before 2020
- `Test-MtAdGroupEmptyNonPrivilegedDetails` - Lists empty non-privileged groups

## Details

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

| Field | Value |
| --- | --- |
| Test ID | AD-OU-05 |
| Severity | Info |
| Suite | Active Directory |
| Product | Active Directory |
| Feature | Organizational units |
| Area | Infrastructure hardening |
| Resource type | OrganizationalUnit |
| MITRE ATT&CK | None |
| PowerShell test | [Test-MtAdOuEmptyDetails](https://github.com/maester365/maester/blob/main/tests/ad/ou/Test.AD-OU-05.ps1) |
| Services | ActiveDirectory |
| Permissions | ActiveDirectory:Ldap:computer:ReadProperty, ActiveDirectory:Ldap:group:ReadProperty, ActiveDirectory:Ldap:organizationalUnit:ReadProperty, ActiveDirectory:Ldap:user:ReadProperty |

</details>

## Source

- Test: [`tests/ad/ou/Test.AD-OU-05.ps1`](https://github.com/maester365/maester/blob/main/tests/ad/ou/Test.AD-OU-05.ps1)
- Documentation: [`tests/ad/ou/Test.AD-OU-05.md`](https://github.com/maester365/maester/blob/main/tests/ad/ou/Test.AD-OU-05.md)
