Click to See Complete Forum and Search --> : active directory - member.name and others


jpmoriarty
01-27-2003, 02:30 PM
I've got script ...


<%

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?

Ribeyed
01-27-2003, 03:47 PM
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

jpmoriarty
01-28-2003, 02:36 AM
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?