We help IT Professionals succeed at work.

returning records from active directory

TRACEYMARY
TRACEYMARY asked
on
Medium Priority
608 Views
Last Modified: 2008-02-01
when i return records from active directory the max no of records i get is 1000
select distinguishedname, employeeid, sn, middlename, givenname, displayname, samaccountname, mail, cn, telephonenumber
 from OpenQuery( ADSI, 'SELECT telephonenumber, distinguishedname, employeeid, sn, middlename, givenname, displayname, samaccountname, mail, cn, telephonenumber
 FROM ''LDAP://DC=domain,DC=mydc,DC=com''
 WHERE objectCategory = ''Person'' AND objectClass= ''user''
 AND sn >=''m''')

anyone know why is there a limitiation.....?
Comment
Watch Question

Commented:
It will default to 1000 records max, but you can set the pagesize to overcome this.

cmd.properties("page size ")= 500

Look about half way down on this site for more information

http://www.wisesoft.co.uk/scripts/adprog_part2.php

JR

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
i see the max size ......how do i add the cmd.properties to the script above as im doing this all in sql select.
thanks...............
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.