# User in container count should be retrievable

Users are easier to manage when placed in organizational units (OUs) that align to administration, policy, and lifecycle requirements.

Source: https://maester.dev/docs/tests/AD-USER-19

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

```powershell title="Run this check"
Invoke-Maester -TestId AD-USER-19
```

## Overview

Users are easier to manage when placed in organizational units (OUs) that align to administration, policy, and lifecycle requirements. Accounts stored in container paths such as `CN=Users` often indicate default placement or limited organizational structure.

- **Delegation limitations**: Containers are less flexible for delegated administration
- **Policy design impact**: OUs are the preferred structure for policy and lifecycle management
- **Default placement visibility**: Helps identify accounts still living in `CN=Users` or similar container paths

#### Control Type

**Detective**

#### Security Recommendation

- Move standard user accounts from container paths into appropriate OUs
- Define an OU model that supports administration, policy, and lifecycle requirements
- Regularly review new accounts for default or non-standard placement

#### How the Test Works

This test counts user objects whose distinguished names indicate they are beneath a container path, including accounts under `CN=Users`.

#### Related Tests

- `Test-MtAdUserManagerSetCount` - Helps assess whether organizational metadata is mature enough for governance
- `Test-MtAdUserKnownServiceAccountCount` - Finds service accounts that may also require dedicated OUs

## Details

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

| Field | Value |
| --- | --- |
| Test ID | AD-USER-19 |
| Severity | Info |
| Suite | Active Directory |
| Product | Active Directory |
| Feature | Users |
| Area | Infrastructure hardening |
| Resource type | User |
| MITRE ATT&CK | None |
| PowerShell test | [Test-MtAdUserInContainerCount](https://github.com/maester365/maester/blob/main/tests/ad/user/Test.AD-USER-19.ps1) |
| Services | ActiveDirectory |
| Permissions | ActiveDirectory:Ldap:user:ReadProperty |

</details>

## Source

- Test: [`tests/ad/user/Test.AD-USER-19.ps1`](https://github.com/maester365/maester/blob/main/tests/ad/user/Test.AD-USER-19.ps1)
- Documentation: [`tests/ad/user/Test.AD-USER-19.md`](https://github.com/maester365/maester/blob/main/tests/ad/user/Test.AD-USER-19.md)
