Re: Distribution List Members Export

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



cnei1950 wrote:

I have been struggling with both LDIFDE & CSVDE to try and get the list of
members in an AD 2003 distribution list with their email address.
Could anyone share a sample string for this?
Any help would be greatly apprecited.
Celes

Hi,

Try something similar to below to enumerate members of
cn=Mylist,ou=Sales,dc=MyDomain,dc=com:

csvde -f report.txt -r "memberOf=cn=MyList,ou=Sales,dc=MyDomain,dc=com" -l
sAMAccountName,displayName,mail
ldifde -f report.txt -r "memberOf=cn=MyList,ou=Sales,dc=MyDomain,dc=com" -l
sAMAccountName,displayName,mail

You must specify the full distinguished name of the distribution group.

--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net


.



Relevant Pages

  • Re: Export Group membership using scriptCSVDE
    ... Microsoft MVP Scripting and ADSI ... Hilltop Lab - http://www.rlmueller.net ... Names of all members. ...
    (microsoft.public.windows.server.scripting)
  • Re: simple script fails
    ... Microsoft MVP Scripting and ADSI ... Hilltop Lab - http://www.rlmueller.net ... myGroup is not the primary group for the two members. ...
    (microsoft.public.windows.server.scripting)
  • Re: How many objects in AD?
    ... More pertinent would be problems with groups with more than 5000 members. ... Microsoft MVP Scripting and ADSI ... Hilltop Lab - http://www.rlmueller.net ...
    (microsoft.public.windows.server.active_directory)
  • Re: question(s) re: win32::ole and active-directory interaction
    ... I have attached a module I wrote to simplify ADSI queries. ... our $ADSILastErr = ''; ... =head1 VERSION ... Gets all members of a group, ...
    (comp.lang.perl.modules)
  • Re: question(s) re: win32::ole and active-directory interaction
    ... You should be able to get the basics of ADSI over Win32::OLE by looking at the code. ... our $ADSILastErr = ''; ... =head1 VERSION ... Gets all members of a group, ...
    (comp.lang.perl.modules)