active-directoryldap

LDAP Query via Windows CMD


Everywhere I find solutions for what a LDAP Query has to look in Windows CMD. For instance:

Example for a LDAP Query in commandline-program:
ldapsearch -h ldap.acme.com -p 389 -s sub -D "cn=Directory Manager,o=acme" -W -b "ou=personen,o=acme" "(&(mail=joe)(c=germany))" mail*

It is not a problem for me to adjust such a query to my needs, but none of the common help pages tells you how to make the ldap commands work. Every time I try to execute a ldap command, the command line's only response is that the command is not known.

Please tell me what I have to download or where I have to navigate to make this command work.

Thanks


Solution

  • Ldapsearch.exe is a tool that was included with Windows 2000, it isn't used anymore, and was superseded by dsquery in Server 2003. However if you are querying Active Directory, you should just use the Active Directory PowerShell Module instead, which is included with the Remote Server Admin Tools.