# Trust total count should be investigated

Domain trusts are critical security boundaries in Active Directory environments. Understanding the number and configuration of trusts is essential for:

Source: https://maester.dev/docs/tests/AD-TRUST-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 · Trusts · <a href="/docs/tests">All checks</a></p>

```powershell title="Run this check"
Invoke-Maester -TestId AD-TRUST-01
```

## Overview

Domain trusts are critical security boundaries in Active Directory environments. Understanding the number and configuration of trusts is essential for:

- **Security Assessment**: Knowing how many external entities can authenticate in your environment
- **Attack Surface Management**: Each trust represents a potential attack vector that needs monitoring
- **Compliance Reporting**: Many frameworks require documentation of trust relationships
- **Operational Visibility**: Understanding cross-domain authentication paths

Trusts allow users from one domain to access resources in another. While necessary for multi-domain environments, unnecessary or misconfigured trusts can create security vulnerabilities.

#### Control Type

**Operational**

#### Security Recommendation

- **Inventory**: Maintain an inventory of all trust relationships and their purposes
- **Regular Review**: Periodically review trusts to ensure they are still needed
- **Documentation**: Document the business justification for each trust
- **Monitoring**: Monitor trust validation status and authentication events
- **Principle of Least Privilege**: Only create trusts when absolutely necessary

#### How the Test Works

This test retrieves all trust objects from Active Directory using `Get-ADTrust` and counts the total number of configured trusts. The test returns:

- Total count of trusts
- Informational result (no pass/fail criteria)

#### Related Tests

- `Test-MtAdTrustInterForestCount` - Identifies external/inter-forest trusts
- `Test-MtAdTrustQuarantinedCount` - Checks for SID filtering on trusts
- `Test-MtAdTrustStaleCount` - Identifies trusts not validated recently
- `Test-MtAdTrustDetails` - Provides detailed trust configuration information

## Details

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

| Field | Value |
| --- | --- |
| Test ID | AD-TRUST-01 |
| Severity | Info |
| Suite | Active Directory |
| Product | Active Directory |
| Feature | Trusts |
| Area | External access and sharing |
| Resource type | Trust |
| MITRE ATT&CK | None |
| PowerShell test | [Test-MtAdTrustTotalCount](https://github.com/maester365/maester/blob/main/tests/ad/trust/Test.AD-TRUST-01.ps1) |
| Services | ActiveDirectory |
| Permissions | ActiveDirectory:Ldap:trustedDomain:ReadProperty |

</details>

## Source

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