# GPO linked count should be investigated

Linked Group Policy Objects (GPOs) are actively applying settings to users and/or computers across your Active Directory environment.

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

<!-- 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-01
```

## Overview

Linked Group Policy Objects (GPOs) are actively applying settings to users and/or computers across your Active Directory environment.

For security assessments, it is important to understand the scope of actively linked (and therefore applying) policies. This test helps you:

- Identify the ratio of active vs unused policies
- Spot environments where many GPOs exist but only a subset are actually applied
- Prioritize review/cleanup efforts based on real policy exposure

#### Control Type

**Operational**

#### Security Recommendation

- **Review linked (active) GPOs regularly**: Linked policies can change security posture immediately when modified.
- **Audit unused/unlinked GPOs**: Large numbers of unused policies can indicate mismanagement and increase the risk of accidental changes.
- **Use the linked ratio**: A low linked ratio might indicate policy sprawl or a backlog of orphaned policies.

#### How the Test Works

This test retrieves GPO state from Active Directory using **Get-MtADGpoState** (it uses `$gpoState.GPOs` and `$gpoState.GPOLinks`).

It then:

1. Parses `gPLink` values to identify **enabled** (0) and **enforced** (2) link entries.
2. Counts distinct GPO GUIDs that have at least one enabled link.
3. Compares linked GPO count vs total GPO count and reports both metrics in Markdown.

#### Related Tests

- `Test-MtAdGpoTotalCount` - Total GPO inventory
- `Test-MtAdGpoUnlinkedCount` - GPOs not linked anywhere
- `Test-MtAdGpoCreatedBefore2020Count` - Potentially legacy GPOs
- `Test-MtAdGpoChangedBefore2020Count` - Potentially stale GPOs

## Details

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

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

</details>

## Source

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