Getting detailed domain user info from the command line

I had a need the other day to find out if and when my domain account was expiring and a friend of mine offered this command:

C:\>net user billyg /domain

Running that command gives you something like this:

The request will be processed at a domain controller for domain fakedomain.com.

User name                    billyg
Full Name                    Bill Gates
Comment
User's comment
Country code                 (null)
Account active               Yes
Account expires              Never

Password last set            12/1/2008 9:30 AM
Password expires             Never
Password changeable          9/25/2001 8:15 AM
Password required            Yes
User may change password     Yes

Workstations allowed         All
Logon script
User profile
Home directory
Last logon                   1/4/2009 2:04 PM

Logon hours allowed          All

Local Group Memberships      *Administrators
Global Group memberships     *Domain Admins        *Domain Users
The command completed successfully.

 

When you’re a consultant like myself and have a bunch of different domain accounts, it can be a helpful command.

Posted in Windows. 1 Comment »
Follow

Get every new post delivered to your Inbox.