Exchange 2010 Distribution Groups

Is there a script or cmdlets we can use to get all the distribution groups (not security groups) along with its members from an OU. Once we get it we can take that information and recreate the group and re-add the members to a different exchange org.
LVL 26
timgreen7077Exchange EngineerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AmitIT ArchitectCommented:
I suggest you to review your question again. As logically it is not possible.
Amit KumarCommented:
Script is here to get all data about DLs and their members... But this data directly can't be imported to new forest but you will have to manipulate it to create bulk entities.

$saveto = "D:\Data\Members.txt"

Get-DistributionGroup -OrganizationalUnit "ou=sales,dc=domain,dc=local" | sort name | ForEach-Object {

	"`r`n$($_.Name)`r`n=============" | Add-Content $saveto
	Get-DistributionGroupMember $_ | sort Name | ForEach-Object {
		If($_.RecipientType -eq "UserMailbox")
				"," + $_.Name + " (" + $_.PrimarySMTPAddress + ")" | Add-Content $saveto

Open in new window

timgreen7077Exchange EngineerAuthor Commented:
I have tested this script already before I opened this case. I have a script I found online that I'm currently running and I think it may work just fine. The actual script you just mentioned I already had. I don't remember where I got the script but it's titled
Once complete I will update and let you know how this worked.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

timgreen7077Exchange EngineerAuthor Commented:
The below URL is where the script can be found. It works pretty good and the formatting of the content was perfect.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AmitIT ArchitectCommented:
How are you going to add in different forest. You need to create all users again. Still I don't understand the logic, how you are going to implement it.
timgreen7077Exchange EngineerAuthor Commented:
This is the type of script I was looking for.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.