Re: Creating user list w/ldap query

  • From: "Kishor Tripathy" <kctripathy@xxxxxxxxxxxx>
  • To: "[ExchangeList]" <exchangelist@xxxxxxxxxxxxx>
  • Date: Sat, 11 May 2002 18:31:37 +0530

hi pradeep
 
ThanX pradeep for ur help 
i  have not tried this but hope i ll do it 
 
kishor

        -----Original Message----- 
        From: pradeep [mailto:pradeepguns@xxxxxxxxx] 
        Sent: Sat 5/11/2002 5:12 PM 
        To: [ExchangeList] 
        Cc: 
        Subject: [exchangelist] Re: Creating user list w/ldap query
        
        

        http://www.MSExchange.org/
        
        
        Hai,
        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
         ''exchange
        
        Set a = GetObject("LDAP://"; & "CN=Users," & domainContainer)
         For Each usr In a
            If usr.Class = "user" Then
                MsgBox usr.ADsPath
        
            End If
         Next
        
        
        hope this will help you
        comments are welcome
        
        ------------------------------------------------------
        You are currently subscribed to this MSExchange.org Discussion List as: 
kctripathy@xxxxxxxxxxxx
        To unsubscribe send a blank email to 
leave-exchangelist-971299Q@xxxxxxxxxxxxx
        

Other related posts: