Assuming your Active Directory server is at 10.0.0.5 and your domain is mydomain.local
Assuming you have created a user named "queryuser" with the "Active Directory Users and Computers" to connect to the directory with (Anonmous queries are not allowed by default)
ldapsearch -Hldap://10.0.0.5 -b "" -s base -x -W -D firstname.lastname@example.org
To test SSL:
ldapsearch -Hldaps://10.0.0.5 -b "" -s base -x -W -D email@example.com
You should see Microsoft Knowledge Base article 321051 ( http://support.microsoft.com/default.aspx?scid=kb;en-us;321051 ) for details about getting SSL configured for queries.
Be advised if you do not use SSL, password queries will be sent unencrypted across the network.