limitation on extract computers list from domain by vbscript

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi,

I use the following script to extract computers list from active directory
domain, but the problem is it only export 1000 records, is this the
limitation? is there any way to overcome it? many thanks for any advice.



set fs=createobject("scripting.filesystemobject")
set f=fs.opentextfile("C:\ADComputer.txt",2, true)

Dim strdescription
Dim Conn, strRS, RS, strConn
Set Conn = CreateObject("ADODB.Connection")
Set RS = CreateObject("ADODB.Recordset")
Conn.Provider = "ADsDSOObject"
strConn = "Active Directory Provider"
Conn.Open strConn

strRS = "SELECT name, description, whenChanged, whenCreated FROM
'LDAP://ou=Computers, DC=MYDOMAIN, DC=COM' WHERE objectClass = 'Computer'"

RS.Open strRS, Conn, 1, 1
if not (RS.bof and RS.eof) then
RS.movefirst
while not RS.eof
strname=rs("name")
strdescription=RS("description")
strwhenChanged=rs("whenChanged")
strwhenCreated=rs("whenCreated")
if (TypeName(strdescription)="Variant()") then
desc=strdescription(0)
else
desc=""
end if
f.writeline(strname&";"&desc&";"&strwhenCreated&";"&strwhenChanged)
rs.movenext
wend
end if

set f=nothing
set fs=nothing

rs.close
set rs=nothing

conn.close
set conn=nothing
--
Golden_au
.



Relevant Pages

  • RE: limitation on extract computers list from domain by vbscript
    ... Can you tell me what is the LDAP name for Computer objects in Active Directory? ... Dim Conn, strRS, RS, strConn ...
    (microsoft.public.inetsdk.programming.scripting.vbscript)
  • ADSI 80020009 Error on windows 2003
    ... I have the following asp code running well on win 2000. ... Dim Conn, strRS, RS, strConn ... Set Conn = Server.CreateObject ...
    (microsoft.public.inetserver.asp.general)
  • ADSI 80020009 Error on Windows 2003
    ... I have the following asp code running well on win 2000. ... Dim Conn, strRS, RS, strConn ... Set Conn = Server.CreateObject ...
    (microsoft.public.win2000.active_directory)
  • Update an field ADSI with ADOBD via ASP
    ... but why Active Directory does not allow me to do that. ... Const adLockOptimistic = 3 ... Set conn = Server.CreateObject ... Set cmd = Server.CreateObject ...
    (microsoft.public.data.odbc)