Link to home
Start Free TrialLog in
Avatar of emelnik
emelnik

asked on

Need a query to export all the Distribution Lists on a Windows 2003 AD with Exchange 2003

Hello,

I need a query or script that can help me get Distribution Lists the following information on a Windows 2003 AD with Exchange 2003:

1 .Export all existing DL's
2. Attributes: DL displayname, DL internal and external email addresses, DL cn
3. User memberships: username, email address, cn, displayname
4. Owner permissions: username, email address, cn, displayname
5. SendAS permissions: username, email address, cn, displayname
6. Restricted users: username, email address, cn, displayname
7. Restricted groups: group email address, cn, displayname


Any help is greatly appreciated.

Avatar of endital1097
endital1097
Flag of United States of America image

install powershell and the quest ActiveRoles management shell for active directory
then you would need a script or two to get this like the following to get 1 and 2

Get-QADGroup -GroupType Distribution | Select DisplayName,EmailAddresses,CanonicalName

for #3
Get-QADGroup -GroupType Distribution | Get-QADGroupMember | Select SamAccountName,Email,CanonicalName,DisplayName

for #4
Get-QADGroup -GroupType Distribution | Get-QADUser $_.ManagedBy | Select SamAccountName,Email,CanonicalName,DisplayName

this should get you in the direction you need
ASKER CERTIFIED SOLUTION
Avatar of endital1097
endital1097
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of emelnik
emelnik

ASKER

endital1097,

I have Exchange 2003 not Exchange 2007.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of emelnik

ASKER

Tried the quest tool but I never got it to work the way I need it, got outputs like this:

DisplayName                             EmailAddresses                          CanonicalName                          
-----------                             --------------                          -------------                          
ld email                                {SMTP:ldemail@cfmex.com.mx, smtp:lde... sur.banco.banamex.com/UsuariosReplic...
Ld 7874 Servicio a Clientes             {SMTP:Ld7874ServicioaClientes@cfmex.... sur.banco.banamex.com/UsuariosReplic...

Don't know how to get rid of the "..." and get the full output on a csv format.

What I need is a csvde command like the one below:

csvde -f c:\temp\DistributionLists -p subtree -l "cn,mail,displayName" -r (&(objectCategory=Group)(objectClass=Group)(|(groupType=8)(groupType=4)(groupType=2))) -j c:\temp

Can you help?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of emelnik

ASKER

Pointed me in the direction to solve my problem.