In huge AD infrastructures with several OUs and thousands of users and/or computers, it becomes difficult many times to be able to locate users/computers and which OU structure they reside in. A very handy command line tool for AD administrators is the DSQUERY utility.

  1. How To Install Dsquery On Windows 7 1
  2. How To Install Dsquery On Windows 7 Download
How To Install Dsquery On Windows 7Dsquery

How To Install Dsquery On Windows 7 1

Install

This command line tool is built into Windows 2008 when the domain services role is installed. Administrators may also avail themselves to this beneficial tool on their Windows 7 workstations by installing the Remote System Administration Toolkit.

How To Install Dsquery On Windows 7 Download

The official Technet article is describing the functionality of this command line utility. DSQUERY can do many different things and can be used in conjunction with other command line utilities found in the DS. family by the way of piping.Finding a User or Computer.

I'm guessing you've a 32 bit install of Perl on a 64 bit OS. There isn't a 32 bit version of dsquery.exe in C:WindowsSysWOW64 on Windows 10 AMD64. From the 'Run' dialog compare the results of the following.With 32 bit cmd: C:WindowsSysWOW64cmd.exe /K C:windowssystem32dsquery.exeThen explicitly using 64 bit cmd: C:WindowsSystem32cmd.exe /K C:windowssystem32dsquery.exeOr just DIR C:WindowsSysWOW64dsq.DIR C:WindowsSystem32dsq.If you really want to run 64 bit dsquery.exe from a 32 bit environment try using the alias. C:WindowsSysWOW64cmd.exe /K C:windowssysnativedsquery.exeTry this in your script, no guarantees that Perl won't just choke on it. If (`C:Windowssysnativedsquery.exe user -samid $uname`).