views:

16

answers:

1

IS there any way to get the AD searcher to return more than 1k rows, or to get it to return the results in 1k pages?

I need to do a test on all 45k users in our domain.

Code looks like this:

DirectorySearcher search = new DirectorySearcher( entry );

    search.Filter = "(&(objectClass=user))";             
    search.SizeLimit = 100000;//ignored if over 1000            

    foreach ( SearchResult result in search.FindAll() )

Thanks,

Eric-

+3  A: 

Use PageSize for results which may be more than 1000. Example :

Use search.PageSize = 500;

Source

Shoban