Re: Creating user list w/ldap query

  • From: "pradeep" <pradeepguns@xxxxxxxxx>
  • To: exchangelist@xxxxxxxxxxxxx
  • Date: Sat, 11 May 2002 05:42:26 -0600

I faced the same problem ..But i changed the approach with the snippet
given below

and got the users


Dim rootDSE, domainObject
Dim a As IADs
Dim usr As IADs
Dim ret As Long
Set rootDSE = GetObject("LDAP://RootDSE";)
domainContainer = rootDSE.Get("defaultNamingContext")
''assuming that the users node is directly below the Builtdomain in Your

Set a = GetObject("LDAP://"; & "CN=Users," & domainContainer)
 For Each usr In a
    If usr.Class = "user" Then
        MsgBox usr.ADsPath

    End If

hope this will help you
comments are welcome

Other related posts: