?
Solved

How to export Exchange distribution list properties?

Posted on 2009-04-21
9
Medium Priority
?
2,456 Views
Last Modified: 2012-05-06
I need to script the export of all distribution lists (query-based or otherwise), the manager (if defined), whether the manager has the ability to update the list, and whether there are restrictions on sending to each list. What's the easiest method to do this? Specific examples would be appreciated.
0
Comment
Question by:JimMueller
  • 7
9 Comments
 
LVL 32

Expert Comment

by:gupnit
ID: 24196389
Hi,
Try Get-DistributionGroup | Format-List
Thanks
Nitin
0
 

Author Comment

by:JimMueller
ID: 24196510
I'm not familiar with which interface I would use those commands...?
0
 
LVL 65

Expert Comment

by:Mestha
ID: 24197384
Would help if you identified the version of Exchange involved. The command above is for Exchange 2007.

Simon.
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:JimMueller
ID: 24197531
Sorry, Exchange 2003 SP2.
0
 

Author Comment

by:JimMueller
ID: 24197880
So far I have this, which exports the cn, manager, users approved to send, and DL's approved to send. I haven't been able to isolate 1) which ADSI attribute indicates their are sending restrictions, (or perhaps it's simply whether AuthOrig and/or dlMemSubmitPerms have non-default values) and 2) which ADSI attribute indicates whether the manager has permission to modify the membership.

csvde -f c:\temp\groups.csv -p subtree -l cn,managedBy,AuthOrig,dLMemSubmitPerms  -r "(|(&(objectCategory=Group)(objectClass=Group)(|(groupType=8)(groupType=4)(groupType=2)))(objectCategory=ms-Exch-Dynamic-Distribution-List)(objectClass=msExchDynamicDistributionList))" -j c:\temp
0
 

Author Comment

by:JimMueller
ID: 24198294
Dang it, I just found that we have e-mail enabled security groups also that I need to be included.
0
 

Author Comment

by:JimMueller
ID: 24198485
I found this separate command which will export the e-mail enabled security groups. Can I merge the aforementioned csvde command and this dsquery command together?

DSQuery * ForestRoot -Filter "(&(samAccountType=268435456)(mail=*))" -Limit 0
0
 

Author Comment

by:JimMueller
ID: 24204311
It appears the following syntax is working correctly as a ADUC query...it prefixed the "(&" and the final ")" to my query:

(&(|(&(objectCategory=Group)(objectClass=Group)(|(groupType=8)(groupType=4)(groupType=2)))(objectCategory=ms-Exch-Dynamic-Distribution-List)(objectClass=msExchDynamicDistributionList)(&(samAccountType=268435456)(mail=*))))

...but when I try to use the exact same syntax with csvde...

C:\temp>C:\temp>csvde -f c:\temp\groups.csv -p subtree -l cn,managedB
y,AuthOrig,dLMemSubmitPerms -r "(&(|(&(objectCategory=Group)(objectClass=Group)(
|(groupType=8)(groupType=4)(groupType=2)))(objectCategory=ms-Exch-Dynamic-Distri
bution-List)(objectClass=msExchDynamicDistributionList)(&(samAccountType=2684354
56)(mail=*))))" -j c:\temp

...it gives me the error:

| was unexpected at this time.

If I drop off the prefix and suffix characters it put in the ADUC query, it then tells me "& was unexpected at thsis time." What am I doing wrong?
0
 

Accepted Solution

by:
JimMueller earned 0 total points
ID: 24204484
I guess it was a simple typo, it's working now!

C:\temp>csvde -f c:\temp\DistributionLists.csv -p subtree -l cn,mail,member  -r
"(|(&(objectCategory=Group)(objectClass=Group)(|(groupType=8)(groupType=4)(group
Type=2)))(objectCategory=ms-Exch-Dynamic-Distribution-List)(objectClass=msExchDy
namicDistributionList)(&(samAccountType=268435456)(mail=*)))" -j c:\temp
Connecting to "dc.domain.com"
Logging in as current user using SSPI
Exporting directory to file c:\temp\DistributionLists.csv
Searching for entries...
Writing out entries
................................................................................
.
Export Completed. Post-processing in progress...
81 entries exported

The command has completed successfully
0

Featured Post

Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
This article will help to fix the below errors for MS Exchange Server 2016 I. Certificate error "name on the security certificate is invalid or does not match the name of the site" II. Out of Office not working III. Make Internal URLs and Externa…
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses
Course of the Month16 days, 15 hours left to enroll

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question