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 17
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.
0
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

0
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
DistributionGroupMemberReport.ps1
Once complete I will update and let you know how this worked.
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

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.

https://gallery.technet.microsoft.com/office/Export-all-distribution-707c27eb
0

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.
0
timgreen7077Exchange EngineerAuthor Commented:
This is the type of script I was looking for.
0
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
Exchange

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.