To check admin users in Windows, open Command Prompt as Administrator and run net localgroup administrators—this lists all local administrators on the current machine. For domain-joined PCs, use net group administrators /domain instead. No extra tools are required—just standard Windows access and appropriate permissions.
What You'll Need
- Access to a Windows PC (Windows 10 or 11)
- Administrator privileges on the local machine or domain (you must be an admin to run these commands)
- Command Prompt or PowerShell (Command Prompt is used here for simplicity and universal compatibility)
Step-by-Step
- Open Command Prompt with elevated rights: Press Windows + S, type
cmd, right-click Command Prompt from the search results, and select Run as administrator. If prompted by User Account Control (UAC), click Yes to confirm. - Run the local admin check command: In the Command Prompt window, type
net localgroup administratorsand press Enter. This queries the built-in Administrators group on the local machine. - Review the output: After pressing Enter, you'll see a list starting with
Alias namefollowed byAdministrators, a description, and then a list of user and group accounts with admin rights (e.g.,Administrator,JohnDoe, orDOMAIN\AdminTeam). The list ends withThe command completed successfully. - Check domain admin users (if applicable): If your PC is joined to a Windows domain (common in businesses/schools), run
net group administrators /domaininstead. This queries the domain-level Administrators group. You may need domain administrator credentials or domain admin rights to execute this successfully. - Export the list to a file (optional): To save the results, use output redirection. For example, type
net localgroup administrators > C:\admin_list.txtand press Enter. This writes the list to a text file on your C: drive. You can open it later in Notepad to review the admin accounts.
Common Mistakes
- Running Command Prompt without admin rights: If you don't run Command Prompt as Administrator, you'll see a
System error 5 has occurred. Access is denied.message. Always verify the window title says Administrator: Command Prompt before typing commands. - Mixing up local vs. domain commands: Using
net localgroupon a domain-joined PC only shows local admins—not domain admins. For domain environments, always usenet group administrators /domainto get the correct list. - Typing the command incorrectly: Commands are case-insensitive, but spaces and typos matter. Ensure there's exactly one space between
netandlocalgroup, and thatadministratorsis spelled correctly (note the plural s). - Confusing standard users with admins: Some accounts may appear in the list with domain prefixes (e.g.,
MYDOMAIN\AdminUser). These are domain admins, not local ones. To distinguish, check the source: local accounts usually appear asCOMPUTERNAME\Usernameor justUsername, while domain accounts include a backslash and domain name.
Tips
- Use PowerShell as an alternative: If you prefer PowerShell, run
Get-LocalGroupMember -Group "Administrators"(Windows 10 version 1709 or later). This gives more structured output, including account types (User/Group) and SID information. - Check remote PCs: To audit admin accounts on another machine on your network, use
net \\REMOTECOMPUTERNAME localgroup administrators. Ensure remote admin access is enabled and firewalls allow it. - Verify group membership visually: For a GUI method, go to Settings > Accounts > Family & other users, then click a user and check Account type. Note: This only shows local users, not domain accounts.
- Document regularly: Run and save the command output weekly or after major system changes. Admin list drift (unauthorized additions/removals) is a common security risk.
Troubleshooting
If your command fails or returns unexpected results, follow these checks in order:
- Confirm UAC settings: On the PC you're using, open Local Security Policy (
secpol.msc) > Local Policies > Security Options, and ensure User Account Control: Run all administrators in Admin Approval Mode is Enabled. If disabled, UAC may not prompt correctly, causing permission issues. - Check network connectivity for remote/domain commands: For
net \\HOSTNAMEor/domaincommands, verify you can reach the target PC withping HOSTNAME. If ping fails, resolve network issues first (e.g., DNS, firewall rules). - Restart the Remote Registry service: Run
net start RemoteRegistryin an elevated Command Prompt. Some admin queries rely on this service, especially for remote lookups. - Check for typos in computer names: For remote commands, ensure the computer name is correct and matches the NetBIOS name (not the full DNS name). Use
hostnameto confirm the local name. - Try an alternative method: If
net localgroupstill fails, open PowerShell as Administrator and runGet-LocalUser | Where-Object { $_.SID -like "*-500" }to find the built-in admin (SID ends in -500), or useGet-LocalGroupMember -Name "Administrators"for full details. If PowerShell fails, your system may be corrupted—runsfc /scannowto repair system files.
Frequently Asked Questions
How do I know if an account is an admin using Command Prompt?
Run net localgroup administrators and check if the account appears in the list. Domain accounts will show with a backslash (e.g., DOMAIN\User), while local accounts appear as PCNAME\User or just User.
Can I check admin users without admin rights?
No. Standard users cannot view the Administrators group membership via net localgroup due to security restrictions. You must be logged in with administrator privileges to run this command successfully.
Why does the command show groups instead of individual users?
Windows often assigns admin rights to groups (e.g., Domain Admins, Desktop Support), not just individuals. To see who’s in a group, run net localgroup "Group Name" (e.g., net localgroup "Desktop Support").
Does this work on Windows 7 or older versions?
Yes. The net localgroup administrators command works identically on Windows 7, 8, 10, and 11. However, older systems may use net group administrators /domain differently in domain environments.
How do I remove admin rights for a user?
First, verify the user is listed with net localgroup administrators. Then, run net localgroup administrators USERNAME /delete (replace USERNAME with the account name). Always double-check the username to avoid removing the wrong account.
Is there a way to see who added or removed an admin?
Yes—check the Security event log. Open Event Viewer (eventvwr.msc) > Windows Logs > Security. Filter for Event ID 4732 (member added to admin group) or 4733 (member removed). You must have auditing enabled for group changes.