Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted

Hi All,

 

I currently have exchange 2010 and am planning some house keeping on the server, is there away where i can create a report of all distribution list on my exchange 2010 server and and export to csv or txt file so i will end up with a complete list of DL and it's members

 

Thanks in Advance

Posted

Powershell is usually the best way:

 

$file = "C:\output.csv"
$groups = Get-DistributionGroup

echo "Distribution Group,Display Name,Alias,E-Mail address" | out-file -Encoding ascii $file

foreach ($group in $groups) {
$groupmembers = Get-DistributionGroupMember $group
foreach ($groupmember in $groupmembers) {
	$displayname = $groupmember.displayname
	$alias = $groupmember.alias
	$email = $groupmember.primarysmtpaddress
	echo "$group,$displayname,$alias,$email" | out-file -Encoding ascii -Append $file
}
}

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...