Exporting members of distribution list to CSV file

Exporting members of distribution list to CSV file

Post by Adam Nickell » Sat, 22 Feb 2003 02:35:02



Hi,

I need to export members of a certain distribution list to a file,
preferably a CSV file. I have a script I found on the MS website which shows
me how to loop through a specified distribution list and display the users,
but I need this to end up in a file, and ideally showing just the users
display name.

Here's the script I got from MS :

Set objGroup = GetObject _
  (LDAP://cn=SampleGroup,ou=SampleOU,dc=SampleDomain,dc=com)
For each objMember in objGroup.Members
    Wscript.Echo objMember.Name
Next

Anyone know how to adapt this to do what I want? I really don't know a lot
about this stuff, although I can code in VBScript with no problems....

Thanks,

Adam