Windows built-in command (non-PowerShell) to list out computers in an OU

I don't have admin rights & can't install dsquery/RSAT.

Is there a Windows command prompt command to list out member computers of an OU ?
Pls give exact syntax
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sunhuxAuthor Commented:
Somehow Powershell kept giving me errors, so I prefer not use PowerShell: think it's restricted
Mal OsborneAlpha GeekCommented:
dsquery Will do it.

dsquery computer ou=Marketing,dc=microsoft,dc=com is the syntax.
sunhuxAuthor Commented:
on my corporate PC,  there's no dsquery.  I don't have admin rights to install it.

If need be, can you point me to where to downloads dsquery for Win 10 (64bit):
I downloaded the following: does it contain dsquery?

Do we need the following to run dsquery:
How the Cloud Can Help You as an MSSP

Today, every Managed Security Service Provider (MSSP) needs a platform to deliver effective and efficient security-as-a-service to their customers. Scale, elasticity and profitability are a few of the many features that a Cloud platform offers. Register today to learn more!

sunhuxAuthor Commented:
Got to PowerShell using local administrator with a one-time help of an EndUser Computing support:
ran into error:

PS C:\Windows\system32> Get-ADComputer -Filter * -SearchBase "OU=IT, DC=contoso, DC=com"
Get-ADComputer : The term 'Get-ADComputer' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
At line:1 char:1
+ Get-ADComputer -Filter * -SearchBase "OU=IT, DC=contoso, DC=com"
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Get-ADComputer:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
NVITEnd-user supportCommented:
If you are allowed to run third party tools, try adfind, at

Command line Active Directory query tool. Mixture of ldapsearch, search.vbs, ldp, dsquery, and dsget tools with a ton of other cool features thrown in for good measure. This tool proceeded dsquery/dsget/etc by years though I did adopt some of the useful stuff from those tools.

Generally a normal Active Directory user can return a considerable amount of information from Active Directory while ADAM/ADLDS tends to be more locked down.
Sajen JoseCommented:
Get-ADComputer : The term 'Get-ADComputer' is not recognized as the name of a cmdlet, function, script file

The above cmdlet of Get-ADComputer will work only if you have the Active Directory Module installed. You may want to review the steps here -
Derek SouterITO Svc Delivery Cons IIICommented:
if you have a recent version of Excel installed, you can download and install Power Query (

this allows you to communicate with Active Directory, and pull objects and data directly from AD (assuming you have rights to read that information in the first place)

you can then use a simple spreadsheet query to pull all the computer objects from the OU - it allows you to browse, and then choose what objects to pull

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sunhuxAuthor Commented:
>allows you to communicate with Active Directory, and pull objects and data directly from AD
> (assuming you have rights to read that information in the first place)
Using a tool (called Desktop Central) which I login using a non-domain admin, was able to query
the OU for its member computers but this account does not belong to me.  The End User support
logged in for me for a short while.

I've just got clearance to install VSAT tool, then under "Add Features", enabled VSAT.  Then rebooted
the PC but after that, when typing 'dsquery' at command prompt, it returned with message this is
not a valid command : what did I miss?
Derek SouterITO Svc Delivery Cons IIICommented:
by default, all users in a domain have rights to read all objects - some environments are locked down to prevent this (hence my comment about having rights).    

have you installed the correct RSAT tools for your operating system?    I installed this version ( on Windows 10, and it worked without any need for a reboot.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.