Dealing with large group memberships (range retrieval) using PowerShell (v1)

I'm working on a project where I need to have a script return the distinguished names of all members of a distribution group.  Easy enough, except when the distribution group has more then 1,500 members.  I know I can do this with non-native cmdlets or the Exchange cmdlets, but I really need to do this using LDAP\ADSI.  The problem appears to be that I need to use range retrieval, however I'm having a hard time finding working code samples that do this.  Does anyone have any code samples that can be used to spit out group member DN's for distribution groups that are larger than 1,500 members?

As always...thanks!
LVL 1
evetsleepAsked:
Who is Participating?
 
Chris DentPowerShell DeveloperCommented:

Hey,

MOW has an example of this in PowerShell here:

http://mow001.blogspot.com/2006/04/large-ad-queries-in-monad.html

Is that what you needed? I can think of a few other ways to do it, including skipping ADSI and going for DirectoryServices.Protocols instead, fair bit more complex though.

Chris
0
 
evetsleepAuthor Commented:
That was it...thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.