Auditing local administrator memberships is a common security requirement. This script is read-only, idempotent, and suitable for production use across servers and workstations.
Use Cases
-
Privileged access reviews
-
Incident response triage
-
Compliance audits
-
Baseline comparisons
Environment
-
Windows 10 / 11
-
Windows Server 2019 / 2022
-
PowerShell 5.1 or newer
Script (SAFE – Read-Only)
Enhancements (Optional, Still Safe)
Add basic logging:
Verification
Validate that:
-
Output contains expected users
-
No system state was modified
Rollback
No rollback required.
Script performs no write operations beyond CSV and log creation.
Leave a Reply