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
sunhuxAsked:
Who is Participating?
 
Derek SouterITO Svc Delivery Cons IIICommented:
if you have a recent version of Excel installed, you can download and install Power Query (https://www.microsoft.com/en-gb/download/details.aspx?id=39379)

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
1
 
sunhuxAuthor Commented:
Somehow Powershell kept giving me errors, so I prefer not use PowerShell: think it's restricted
1
 
Mal OsborneAlpha GeekCommented:
dsquery Will do it.

dsquery computer ou=Marketing,dc=microsoft,dc=com is the syntax.
0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
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?
   WindowsTH-RSAT_WS_1709-x64.msu


Do we need the following to run dsquery:
  Windows6.2-KB2693643-x64.msu
0
 
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
again.
At line:1 char:1
+ Get-ADComputer -Filter * -SearchBase "OU=IT, DC=contoso, DC=com"
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Get-ADComputer:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
0
 
NVITCommented:
If you are allowed to run third party tools, try adfind, at
http://www.joeware.net/freetools/tools/adfind/

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.
2
 
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 - https://blogs.msdn.microsoft.com/adpowershell/2009/02/25/active-directory-module-for-windows-powershell-quick-start-guide/
2
 
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?
0
 
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 (https://www.microsoft.com/en-gb/download/details.aspx?id=45520) on Windows 10, and it worked without any need for a reboot.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.