Don't have Telegram yet? Try it now!
http://www.macaalay.com/2017/01/13/the-most-comprehensive-ldap-query-in-sql-server-to-extract-active-users-from-active-directory/
The most comprehensive LDAP Query in SQL Server to Extract Active Users from Active Directory