Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Searching Exchange 5.5 Directory

0 views
Skip to first unread message

Stefan

unread,
May 12, 2006, 11:29:45 AM5/12/06
to
Hello,

maybe someone can give me a hint. I want to look after all users in my
Exchange 5.5 Directory but with the code attached it
is only possible to list the users in the initial OU.

What I am doing wrong?

Regards
S.P.

strExchange55Server = ""
strExchange55Site = ""
strExchange55Org = ""

Set adoConn = CreateObject("ADODB.Connection")
adoConn.Provider = "ADSDSOObject"
adoConn.Open "Active Directory Provider"
Set adoCmd = CreateObject("ADODB.Command")

Set adoCmd.ActiveConnection = adoConn

strQueryString = "<LDAP://" & strExchange55Server &
"/cn=Recipients,ou=" & strExchange55Site & ",o=" & strExchange55Org &
">;" & _

"(objectClass=organizationalPerson);adspath,distinguishedName,uid,givenName,initials,sn,mail;subtree"

adoCmd.CommandText = strQueryString
adoCmd.Properties("Page Size") = 100

Set adoRS = adoCmd.Execute

Do While Not adoRS.EOF
wscript.Echo adoRS.Fields("adspath").Value
adoRS.MoveNext
Loop

adoRS.Close
adoConn.Close

0 new messages