Getting the list of members and exporting it to a simple .csv file can be achieved using the Powershell script below.
Note that you should change the first two (2) variables ($DLName and $ExportFilePath) accordingly.
#Script to get/export list of all distribution group members
#Date Created: 24th January, 2013
#Author: Peter Morrissey
#Enable Exchange cmdlets
add-pssnapin *exchange* -erroraction SilentlyContinue
$ExportFilePath = "C:\Export\Export.csv"
$MemberList = get-distributiongroupmember -identity $DLName
ForEach ($Member in $MemberList){write-output "$($member.name)" | out-file -filepath "$exportfilepath" -append -noClobber}
No comments:
Post a Comment