One Star

tldapinput and scope (base, one-level, subtree) how?

I am attempting to use tLDAPinput to pull group info from Active Directory.  My problem: mucho groups, like so

OU=groups:  1612 members at that level

OU=Courses,OU=groups: 6893 members at that level

OU=CS,OU=Groups: 272 members at that level

total of 8900 groups overall.


Q1: How do I define a scope in tLDAPinput, so I can just traverse one level and not sub OUs?


Q2: Anybody mastered how to define the range of an LDAP query, eg, pull the first 5000 entries, then the next 5000, and so on?  Active Directory limits query sizes to 5000 objects max in Windows 2012/2016.  Grrr.