www.webdeveloper.com
Results 1 to 3 of 3

Thread: active directory - member.name and others

  1. #1
    Join Date
    Nov 2002
    Posts
    411

    active directory - member.name and others

    I've got script ...

    Code:
    <%
    
    Dim Dom
    Dim Group
    Dim Member
    Dim strOutput
    
    strDomainName="bedgebury.sch"
    strGroupName="Staff"
    
    Set Domain = GetObject("WinNT://" & strDomainName) 
    Set Group = GetObject("WinNT://" & strDomainName & "/" & strGroupName)
    
    For Each Member in Group.Members   
    
    	strOutput=Null
    
    	If (Left(Member.Parent,8) = "WinNT://") then
    	
    		strOutput = Member.name
    				
    	Elseif Left(Member.Parent,7) = "LDAP://" then
    	 
     		strOutput = strOutput & Domain.Name & "," &  GroupName & "," &_
    			Mid(Member.Parent,8,Len(Member.Parent)-7) &_
    			"\" & Member.Name &"," & Member.Class
    
     	Elseif (Left(Member.Parent,8) = Null) then
    
     	    strOutput = strOutput & Domain.Name & "," &  GroupName & "," &_
     	        Member.Name &"," & Member.Class 
    
     	End If
    
            response.write "<p>" & strOutput & "</p>"
    
    Next
    
    %>
    that goes in and gives me a list of all the users in an active directory i've got. Fantastic! THe only problem is, I only know how to get to member.name and member.class. Is there a listing somewhere of all the other elements? For example, I'd like to extract First name and last name, telephone number etc etc.

    Can that sort of thing be done in this way or is it back to the drawing board?

  2. #2
    Join Date
    Jan 2003
    Location
    Dundee, Scotland
    Posts
    1,367
    hi jpmoriarty,
    never had to do anything with Active Directory, but if you fail to get an answer through this forum i would post it on:

    microsoft.public.inetserver.asp.general

    hope this helps

  3. #3
    Join Date
    Nov 2002
    Posts
    411
    i've not - but i wouldnt really know how to do it anyway! I also have a sneaky suspicion that fullname, name and description are the only properties that i can obtain this way - if i want more then i have to head down the LDAP route.

    Can anyone verify (or deny) this? Is there somethign else (other than member.xxx) that I can use to access teh other AD variables?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles