Windows Tip Sheet

Net Some Users

Back to the good ol' days and the Net User command to get some info on users quickly.

This week we go back to the future again. Back in the day, we didn't need to fancy, schmancy GUIs. We managed users from a command prompt. And walked to school...in the snow....uphill...both ways. Ok, maybe it wasn't that bad, but we got the job done. But even in the 21st century and days of Active Directory, the ol' Net User command still has some value, primarily because it is fast and convenient. The command is no farther than a command prompt away.

On a member server or desktop with local user accounts, the Net user command can provide a wealth of information in a flash -- no mousing through a GUI and no scripting. On your desktop or a member server, open a command prompt and type:

Net user administrator

You should get information like this:

User name                   Administrator
Full Name
Comment                     Built-in account for administering
User's comment
Country code                000 (System Default)
Account active              Yes
Account expires             Never

Password last set           1/13/2007 12:11 PM
Password expires            Never
Password changeable         1/13/2007 12:11 PM
Password required           Yes
User may change password    Yes

Workstations allowed        All
Logon script
User profile
Home directory
Last logon                  1/19/2007 7:15 PM

Logon hours allowed         All

Local Group Memberships     *Administrators
Global Group memberships    *None

At a glance you'll see password information, last local logon and all the groups the user belongs to. But it gets better. Try this:

Net user administrator /domain

and you should get the same information for the domain administrator account. Try it with your domain account:

Net user %username% /domain

Tech Help—Just An
E-Mail Away

Got a Windows, Exchange or virtualization question or need troubleshooting help? Or maybe you want a better explanation than provided in the manuals? Describe your dilemma in an e-mail to the MCPmag.com editors at [email protected]; the best questions get answered in this column and garner the questioner with a nifty Redmond T-shirt.

When you send your questions, please include your full first and last name, location, certifications (if any) with your message. (If you prefer to remain anonymous, specify this in your message, but submit the requested information for verification purposes.)

By the way, to see all local users type:

Net user

or to see all domain users, type:

Net user /domain

Some information at the domain level may not be accurate -- such as last logon -- depending on your domain configuration. You also won't get full group membership of any nested groups. But if you need a quick bit of user account information, you can't go wrong with the classics.

About the Author

Jeffery Hicks is an IT veteran with over 25 years of experience, much of it spent as an IT infrastructure consultant specializing in Microsoft server technologies with an emphasis in automation and efficiency. He is a multi-year recipient of the Microsoft MVP Award in Windows PowerShell. He works today as an independent author, trainer and consultant. Jeff has written for numerous online sites and print publications, is a contributing editor at Petri.com, and a frequent speaker at technology conferences and user groups.

comments powered by Disqus
Most   Popular