Retrieving Users and Groups from AD in chunks??

  • Thread starter Thread starter Johan
  • Start date Start date
J

Johan

Here is my problem and I hope there is someone out-there who can help
me.

I want to search my domain for all users and groups. And since there
are lot of them I want to read them back in chunks of 50, how do I do
that?

I have tried to use the property SizeLimit of the Directory searcher
and yea I only get 50 objects back but how the h-ll do I get the next
chunk of 50 objects back? Can I somehow specify a range similar to the
range that is used to retrive chunks of attributes?

Hope I made some sense atleast because I'm a bit cunfused hera about
what is used for different things in the direcory searcher and the
documentation is quite poor.

I'm starting to get desperate here!

Johan
 
You can't. You need to use Paged searches (0 < PageSize <= max page size,
normally 1000) , but you can't retrieve the pages explicitly. That is all
done for you as you enumerate the results.

You could enumerate the results 50 at a time, but you need to enumerate the
whole result set from one search.

Joe K.
 
Back
Top