Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Using Perl, how to return more than 1000 results from LDAP search?

Posted on 2011-03-25
4
Medium Priority
?
403 Views
Last Modified: 2012-05-11
Hello,

I have a perl script that uses Net::LDAP to query AD. It works correctly, but I can't get more than 1000 results back. I see that there are solutions posted for VBscript but how about perl? I've seen about Net::LDAP::Control::Paged, and I'm able to bring back the amount I specify up to 1000. Does anyone have an example of looping through and getting all records?

Thanks for any help!
0
Comment
Question by:USSteel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 26

Accepted Solution

by:
MidnightOne earned 500 total points
ID: 35226423
According to the Net::LDAP docs, the search parameter sizelimit => N should return all results, but it also says the queried server may limit it anyway.

Try adding this to the search parameters to see if it makes any difference.
0
 

Author Comment

by:USSteel
ID: 35235401
Your comment was correct, thank you. Though, it turns out I had a mistake in not including

use Net::LDAP::Constant qw( LDAP_CONTROL_PAGED );

After I added that line, it pages completely through correctly. I didn't realize that line was necessary.

Thanks for your help.
0
 
LVL 9

Expert Comment

by:Suhas .
ID: 37319332
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Always backup Domain, SYSVOL etc.using processes according to Microsoft Best Practices. This is meant as a disaster recovery process for small environments that did not implement backup processes and did not run a secondary domain controller that ne…
Group policies can be applied selectively to specific devices with the help of groups. Utilising this, it is possible to phase-in group policies, over a period of time, by randomly adding non-members user or computers at a set interval, to a group f…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Six Sigma Control Plans

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question