Skip to content

Do not report the Pre-Windows 2000 group empty when it could not be read #127

Description

@ndemou

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions