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