Problem
HealthTest-PreWin2000Group hides errors from Get-ADGroupMember.
File: health-tests/HealthTest-PreWin2000Group.ps1, lines 12-15.
When the membership query fails, $m is empty and the test reports that the group has no members.
Simple example
The running account can locate the group but cannot enumerate its membership. The query error is hidden and the test reports PASS.
Expected behavior
Use a terminating query, report the read failure, and reserve the empty-group PASS for a successful query that returned zero members.
Acceptance criteria
- A membership-query error cannot produce PASS.
- Useful AD error text is included.
- A genuinely empty group still passes.
- Unit tests cover empty, populated, and failed queries.
Problem
HealthTest-PreWin2000Grouphides errors fromGet-ADGroupMember.File:
health-tests/HealthTest-PreWin2000Group.ps1, lines 12-15.When the membership query fails,
$mis empty and the test reports that the group has no members.Simple example
The running account can locate the group but cannot enumerate its membership. The query error is hidden and the test reports PASS.
Expected behavior
Use a terminating query, report the read failure, and reserve the empty-group PASS for a successful query that returned zero members.
Acceptance criteria