To list users, use the net user
command:
net user
You output get something like this:
User accounts for \\LOCALHOST
-------------------------------------------------------------------------------
joeuser administrator guest
The command completed successfully.
If you need a list of users in a specific group, the use net localgroup
:
net localgroup Users
You output get something like this:
Alias name Users
Comment Users are prevented from making accidental or intentional system-wide changes and can run most applications
Members
-------------------------------------------------------------------------------
NT AUTHORITY\Authenticated Users
NT AUTHORITY\INTERACTIVE
The command completed successfully.
This is for local system users, not domain accounts. If you want to know the membership of the Administrators group, you would just supply that as a parameter: net localgroup Administrators
.
Should the list include "Power Users"? Guests? Standard users that have been granted Admin-equivalent privileges? The distinction is not as strict as you may think. – user1686 – 2011-10-10T12:02:57.423
I guess I pretty much want enabled standard users. In the scenario I need this for, the users are very unlikely to have created a bunch of accounts with weird privileges – D. Strout – 2011-10-10T13:22:16.637