Problem
HealthTest-GcPlacement declares forest scope and says it checks every AD site, but it calls Get-ADDomainController -Filter * only for the current domain.
File: health-tests/HealthTest-GcPlacement.ps1, lines 12-24.
Sites and domain controllers that exist only in other forest domains are not included, so the test can report forest-wide PASS from a partial view.
Simple example
A forest has two domains. The current domain has a GC in each of its sites. Another domain has a site with domain controllers but no GC. Running the test in the first domain reports that each AD site has a GC.
Expected behavior
Enumerate sites and domain controllers across every forest domain, or change the declared scope and message to the current domain only. Report domains that could not be queried.
Acceptance criteria
- Forest mode includes DCs and sites from every forest domain.
- A failed domain query makes the result incomplete.
- PASS wording matches the actual search scope.
- Unit tests cover a multi-domain forest model.
Problem
HealthTest-GcPlacementdeclares forest scope and says it checks every AD site, but it callsGet-ADDomainController -Filter *only for the current domain.File:
health-tests/HealthTest-GcPlacement.ps1, lines 12-24.Sites and domain controllers that exist only in other forest domains are not included, so the test can report forest-wide PASS from a partial view.
Simple example
A forest has two domains. The current domain has a GC in each of its sites. Another domain has a site with domain controllers but no GC. Running the test in the first domain reports that each AD site has a GC.
Expected behavior
Enumerate sites and domain controllers across every forest domain, or change the declared scope and message to the current domain only. Report domains that could not be queried.
Acceptance criteria