Here is a VBScript that I used to give me a full list of machines in a
specific OU. This is currently written to list what's in the Computers
Container.
Const ADS_SCOPE_SUBTREE = 2
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objOutputFile = objFSO.OpenTextFile ("listing.txt", ForWriting, True)
Set objConnection = CreateObject("ADODB.Connection")
Set objCommand = CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"
Set objCOmmand.ActiveConnection = objConnection
objCommand.CommandText = _
"Select Name, Location from
'LDAP://CN=Computers,DC=FILL_IN1,DC=FILL_IN2,DC=com' " _
& "where objectClass='computer'"
objCommand.Properties("Page Size") = 1000
objCommand.Properties("Timeout") = 30
objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE
objCommand.Properties("Cache Results") = False
Set objRecordSet = objCommand.Execute
objRecordSet.MoveFirst
ComputerNumber = 0
Do Until objRecordSet.EOF
objOutputFile.Write objRecordSet.Fields("Name").Value & vbcrlf
ComputerNumber = ComputerNumber + 1
objRecordSet.MoveNext
Loop
objOutputFile.Close
msgbox "Script completed with " & ComputerNumber & "Computer names"
You will need to alter 'LDAP://CN=Computers,DC=FILL_IN1,DC=FILL_IN2,DC=com'
to match your circumstances.
Rick J. Jones
-----Original Message-----
From: Myrick, Todd (NIH/CIT) [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 08, 2002 2:33 PM
To: '[EMAIL PROTECTED]'
Subject: [ActiveDir] Issue enumerating more than 1000 members of a group
I am using some LDAP tools to enumerate the members of a group and it will
only list the first 1000 members. I have tried several tools, all with the
same result. Is their a query policy that limits the number of results
returned MaxResultSetSize is the only one that comes to mind. Any help is
appreciated.
Todd Myrick
List info : http://www.activedir.org/mail_list.htm
List FAQ : http://www.activedir.org/list_faq.htm
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/
List info : http://www.activedir.org/mail_list.htm
List FAQ : http://www.activedir.org/list_faq.htm
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/