# Computer DNS host name count should be investigated

Security Implications: - Kerberos Authentication: Required for proper Kerberos ticket requests - SPN Registration: Service Principal Names depend on valid…

Source: https://maester.dev/docs/tests/AD-DCOMP-07

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

```powershell title="Run this check"
Invoke-Maester -TestId AD-DCOMP-07
```

## Overview

- DNS host names (the `dNSHostName` attribute) are essential for proper Active Directory functionality, particularly for Kerberos authentication and service principal name (SPN) registration.

**Security Implications:**
- **Kerberos Authentication**: Required for proper Kerberos ticket requests
- **SPN Registration**: Service Principal Names depend on valid DNS host names
- **Name Resolution**: Critical for service discovery and connectivity
- **Certificate Management**: SSL/TLS certificates often depend on DNS names

**Missing DNS Host Names May Indicate:**
- Improper computer provisioning
- Legacy systems from older AD versions
- Configuration errors during domain join
- Incomplete computer account setup

#### Control Type

**Operational**

#### Security Recommendation

1. **Ensure Proper Configuration**:
   - All computers should have valid DNS host names
   - DNS names should match the computer's actual network name
   - Regular validation of DNS registration

2. **DNS Integration**:
   - Enable dynamic DNS updates for domain members
   - Verify DNS records match AD computer accounts
   - Monitor for DNS registration failures

3. **Remediation**:
   - Update computers missing DNS host names
   - Delete stale computer accounts without DNS names
   - Investigate provisioning process if widespread issue

#### How the Test Works

This test counts computers with and without the `dNSHostName` attribute populated and reports:
- Total computers
- Computers with DNS host names
- Computers without DNS host names
- Percentage coverage

#### Related Tests

- `Test-MtAdComputerDnsZoneCount` - DNS zone distribution
- `Test-MtAdComputerDnsZoneDetails` - Detailed DNS zone analysis
- `Test-MtAdComputerSpnSetCount` - SPN configuration check

## Details

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

| Field | Value |
| --- | --- |
| Test ID | AD-DCOMP-07 |
| Severity | Info |
| Suite | Active Directory |
| Product | Active Directory |
| Feature | Computers |
| Area | Infrastructure hardening |
| Resource type | Computer |
| MITRE ATT&CK | None |
| PowerShell test | [Test-MtAdComputerDnsHostNameCount](https://github.com/maester365/maester/blob/main/tests/ad/security/Test.AD-DCOMP-07.ps1) |
| Services | ActiveDirectory |
| Permissions | ActiveDirectory:Ldap:computer:ReadProperty |

</details>

## Source

- Test: [`tests/ad/security/Test.AD-DCOMP-07.ps1`](https://github.com/maester365/maester/blob/main/tests/ad/security/Test.AD-DCOMP-07.ps1)
- Documentation: [`tests/ad/security/Test.AD-DCOMP-07.md`](https://github.com/maester365/maester/blob/main/tests/ad/security/Test.AD-DCOMP-07.md)
