Query Active Directory From the Command Line

Have you ever noticed how even on a fast computer the active directory users and computers console can take ages to load especially if you just want to check if a user is a memeber of a group or some other quick stats. Well below you will find the way that I do it in order to get the information that I want Right Now!

First press

Windows Key + R

To bring up the run menu.

Now type


To open command prompt and press enter

Once cmd is open (much quicker than active directory console) you can run the following command in order to show all of the details about a user in Active Directory, just replace user with your user name and try it out.

net user /domain USER

From here you can see some handy stats such as:

  • Password expiry
  • Machines that user is allowed to logon to
  • Logon Hours
  • Last Logon Time
  • Group Memebership

We can do the same to a group so that we can see all the users that are a part of that group, just run the following command.

net group /domain GROUPNAME

Just replace GROUPNAME with the name of our group and hit enter, now you can save yourself enough time to make another coffee.