I thought that I would fill this blog with other things that I find useful in my admin work as well. The DSQuery and DSGet commands are really useful tools in my arsenal. These commands are great for finding AD objects and their details.
Quite simply, The DSQuery command finds AD objects and DSGet command gets more details about an AD object.To find a user in active directory:
Dsquery user -name (username or partial name with wildcards)
For example:
The result of the command:
dsquery user -name dwayne*
Will display the following:
“CN=Dwayne La Rose,OU=Tech,OU=Some other OU,DC=SomeDomain,DC=com”
You can then pipe that dquery command into a DSGet command to get more details about objects.
Command:
dsquery user -name dwayne*|dsget user -display -email -tel
Results:
Dispaly Tel email
Dwayne La Rose (555)555-5555 Dwayne.LaRose@domain.com
This command can be used for computers, groups, OU’s and other AD objects.
For more detail on these commands go to http://technet.microsoft.com/en-us/library/cc732952(WS.10).aspx