Domain Ldap Query
For instance if you d like to see which groups a particular user is a part of you d submit a query that looks like this.
Domain ldap query. An ldap query is a command that asks a directory service for some information. Ldap queries can be used to search for different objects computers users groups in the active directory ldap database according to certain criteria. Ldap syntax filters can be used in many situations to query active directory they can be used in vbscript and powershell scripts.
The ldap syntax filter could be. To perform an ldap query against the ad ldap catalog you can use various utilities for example ldapsearch powershell or vbs scripts saved queries feature in the active directory users and computers mmc snap in etc. The primarygrouptoken attribute of the group domain users is the same integer 513.
Openquery adlink select samaccountname from ldap ou users dc your dc com where objectclass user. If you need to query for all users that have domain users designated as their primary search for all users whose primarygroupid attribute is 513. The ldap query limit is set on the domain.
If you can t get your domain admin to increase the limit you can use a filter in the openquery select e g.