Skip to main content
Version: 2.2.1-preview

AD-SUB-01 - Subnet total count should be retrievable

Overviewโ€‹

Subnets are the foundation of Active Directory site assignment:

  • Client location: Subnets determine which site a client belongs to
  • Authentication routing: Directs clients to the nearest domain controller
  • Service discovery: Helps clients find local services
  • Network segmentation: Reflects the physical network topology

Understanding the number and distribution of subnets helps ensure proper client site assignment across the organization.

Security Recommendationโ€‹

  • Maintain accurate subnet definitions that reflect the physical network
  • Review subnet assignments during network changes
  • Remove obsolete subnets to prevent misconfiguration
  • Ensure all IP ranges in use are properly defined

How the Test Worksโ€‹

This test retrieves all Active Directory subnets using Get-ADReplicationSubnet and counts the total number of subnets configured.

  • Test-MtAdSubnetSiteAssociationCount - Counts sites with subnet associations
  • Test-MtAdSubnetWithoutSiteCount - Identifies orphaned subnets
  • Test-MtAdSiteTotalCount - Counts total sites in the domain

Test Metadataโ€‹

FieldValue
Test IDAD-SUB-01
SeverityInfo
SuiteActive Directory
CategoryAD.Site
PowerShell testTest-MtAdSubnetTotalCount
TagsAD, AD-SUB-01, AD.Site

Sourceโ€‹

  • Pester test: tests/ad/site/Test-MtAdSubnetTotalCount.Tests.ps1
  • PowerShell source: powershell/public/ad/site/Test-MtAdSubnetTotalCount.ps1