Custom LDAP control function add custom ldap controls to the select statement.
Syntax:
ldapcontrol(String, String,...)
To find all Deleted Active Directory users, custom control 1.2.840.113556.1.4.417 can be added to the statement as:
Select cn,creatorsName,createTimeStamp,modifiersName, modifyTimeStamp,sAMAccountName,userAccountControl from RootDSE where objectClass='user' and isDeleted=TRUE add ldapcontrols('1.2.840.113556.1.4.417') subtreescope
Related Links: