Easy one-liner for exporting members of a distribution list:
Get
-DistributionGroupMember
-identity
"company-dl"
|
Export-Csv
C:\MyFile.Csv
you can also use “-not” that gives you a nice csv file
Get
-DistributionGroupMember
-identity
"company-dl"
|
Export-Csv
C:\MyFile.Csv -not