# GPO linked OU count should be retrievable

Understanding the distribution of GPO links across Organizational Units is important for several security reasons:

Source: https://maester.dev/docs/tests/AD-GPOL-06

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

```powershell title="Run this check"
Invoke-Maester -TestId AD-GPOL-06
```

## Overview

Understanding the distribution of GPO links across Organizational Units is important for several security reasons:

- **Policy Coverage**: Identifies OUs that may lack necessary security policies
- **Compliance Assessment**: Helps ensure all organizational units receive appropriate policy coverage
- **Security Gaps**: OUs without GPO links may rely solely on domain-level policies, potentially missing OU-specific security controls
- **Policy Management**: Provides visibility into how broadly GPOs are deployed across the directory structure

#### Control Type

**Operational**

#### Security Recommendation

Review OUs without GPO links to ensure:

- They inherit appropriate policies from parent containers
- They don't require OU-specific security policies
- Critical security settings are not being missed
- Consider creating OU-specific policies for organizational units with unique security requirements

#### How the Test Works

This test retrieves all Organizational Units from Active Directory and counts:
- Total number of OUs in the domain
- Number of OUs with GPO links (gPLink attribute is populated)
- Number of OUs without GPO links

The gPLink attribute is checked to determine if any GPOs are linked to each OU.

#### Related Tests

- `Test-MtAdGpoLinkedCount` - Counts distinct GPOs with links
- `Test-MtAdGpoUnlinkedTargetCount` - Counts targets without GPO links
- `Test-MtAdComputerOUCount` - Counts distinct OUs containing computers

## Details

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

| Field | Value |
| --- | --- |
| Test ID | AD-GPOL-06 |
| Severity | Info |
| Suite | Active Directory |
| Product | Active Directory |
| Feature | Group Policy |
| Area | Infrastructure hardening |
| Resource type | OrganizationalUnit |
| MITRE ATT&CK | None |
| PowerShell test | [Test-MtAdGpoLinkedOUCount](https://github.com/maester365/maester/blob/main/tests/ad/gpo/Test.AD-GPOL-06.ps1) |
| Services | ActiveDirectory |
| Permissions | ActiveDirectory:Ldap:groupPolicyContainer.gPCFileSysPath:ReadProperty, ActiveDirectory:File:SYSVOL:Read |

</details>

## Source

- Test: [`tests/ad/gpo/Test.AD-GPOL-06.ps1`](https://github.com/maester365/maester/blob/main/tests/ad/gpo/Test.AD-GPOL-06.ps1)
- Documentation: [`tests/ad/gpo/Test.AD-GPOL-06.md`](https://github.com/maester365/maester/blob/main/tests/ad/gpo/Test.AD-GPOL-06.md)
