21

The dsquery command line tool is mentioned in the solution to several questions about Active Directory. However, my workstation does not have this command line tool. Where do I get it?

Brandon DuRette
  • 4,810
  • 5
  • 25
  • 31
  • 2
    To get the dsquery command on latest Windows10 go to: Apps and Features - Manage optional features - Add a Feature - install RSAT: Active Directory Domain Services – Coden Oct 31 '18 at 14:57

5 Answers5

21

For Windows 7, it's part of the Remote Server Administration Tools (RSAT) feature pack:

http://www.microsoft.com/en-us/download/details.aspx?id=7887

This can be used for W2003 and W2008 servers.
Information on how to install these with the dism command can be found in my blog post.

For Windows 8, it's on:

http://www.microsoft.com/en-us/download/details.aspx?id=28972

This one is for managing W2012 servers:

http://www.microsoft.com/en-us/download/details.aspx?id=7887

Eelco L.
  • 714
  • 7
  • 7
  • 13
    After installing, remember to go into your "Windows Features" control panel and turn it on through "Remote Server Administration Tools | Role Administration Tools | AD DS and AD LDS Tools" – ftexperts Aug 18 '14 at 20:44
  • 10
    For windows 10 it is available here: https://www.microsoft.com/en-us/download/details.aspx?id=45520 – BiLaL Nov 21 '15 at 08:22
  • All tools will be enabled by default in Windows 10 right after the installation. – SerG Aug 19 '16 at 12:53
  • The blog post http://www.actualadmins.com/entry/windows-7-w2008-managing-features-with-the-command-line-and-the-remote-server-administration-tools/ is gone. – Jeroen Wiert Pluimers Dec 27 '16 at 10:51
  • The blog post link has been repaired. – Eelco L. Mar 23 '17 at 09:48
8

Even better than dsquery is the adfind and admod tools from joeware

Much more powerful.

benPearce
  • 37,735
  • 14
  • 62
  • 96
  • Great tool, easy to use, with `AdFind.exe -h hostname -f userPrincipalName="LOGIN*"` you can easily find your entry and understand the structure of the directory. – jan Jan 23 '14 at 09:21
3

On Win2008 and Win2012:

To install Active Directory Domain Services Tools on a server that runs Windows Server 2008 & 2012

Control Panel | Programs and Features | Add/remove Windows Features

Go through wizard to "Add Roles and Features Wizard"

Dig into Features

Click down to: Remote Server Administration Tools, | Role Administration Tools, | Active Directory Domain Services Tools, and then click Next.

Click Install.

Jonesome Reinstate Monica
  • 6,618
  • 11
  • 65
  • 112
1

The dsquery tool, and other command line tools for Active Directory are available in the Windows Server 2003 Administration Tools Pack.

Brandon DuRette
  • 4,810
  • 5
  • 25
  • 31
-1

I am dealing with Windows 7 x86. After installing (Windows6.1-KB958830-x86-RefreshPkg.msu). I do ENABLE these FEATURES. RSAT under Programs and Features

Rhak Kahr
  • 740
  • 7
  • 10