List distribution group member mail addresses

  • From: "Douglas M. Long" <admindoug@xxxxxxxxx>
  • To: "'[ExchangeList]'" <exchangelist@xxxxxxxxxxxxx>
  • Date: Fri, 27 Jan 2006 09:47:53 -0500

Hi, 

I am using the following script to enumerate the members of distribution
group. What I really need is the email address of the member, not their DN.
Is there an easy way to do that? Or is there an easier way to export the
email addresses of all members of a group (I am doing this so that when a
user needs a list of people on the list I don't have to go in manually)?

On Error Resume Next
 
Set objGroup = GetObject _
  ("LDAP://cn=people,ou=Distro Groups,dc=domain,dc=com")
objGroup.GetInfo
 
arrMemberOf = objGroup.GetEx("member")
 
WScript.Echo "Members:"
For Each strMember in arrMemberOf
    WScript.echo strMember
Next



Other related posts:

  • » List distribution group member mail addresses