dim conn,
rs, stquery, oargs
set oargs
= wscript.arguments
stquery = "<"+oargs.item(0)+">;(objectClass=*);cn,adspath;onelevel"
wscript.echo
stquery
Set conn =
CreateObject("ADODB.Connection")
conn.Provider
= "ADSDSOObject"
conn.Open
"ADs Provider"
Set rs =
conn.Execute(stQuery)
' go get
the object instances
while not
rs.eof
wscript.echo
rs.fields(0).value,rs.fields(1).value
rs.movenext
wend