
To list the local administator accounts, you can just use the group membership command
1Get-LocalGroupMember -Group "Administrators"
1ObjectClass Name PrincipalSource
2----------- ---- ---------------
3User MyPC\Administrator Local
4User MyPC\Ben MicrosoftAccount
Related articles

Apr 15, 2025 · 6 min read
Automate Cloudflare DNS management with PowerShell
Cloudflare is a popular service for managing DNS records, providing security features and optimizing website performance. Automating DNS …
Let's Work Together
Looking for an experienced Platform Architect or Engineer for your next project? Whether it's cloud migration, platform modernization or building new solutions from scratch - I'm here to help you succeed.

Comments