LDAP: how-to bind to Active Directory12-03-2008
When using scripts and Active Directory, there are several ways to connect to a domain or forest:
Connects to the global catalog of the domain, relying on DNS records to locate the GC.
Uses LDAP to connect to the domain. To see which domain controller you will actually connect to, execute “SET LOGONSERVER” on your prompt. This is the domain controller which was used to authenticate your logon request and was appointed to handle this request using AD Sites & Services based on your computer’s IP subnet.
Binds directly to a specific OU, used to set a scope for queries.
connects directly to a domain controller