Export Distribution Group members in a CSV file

Get-DistributionGroupMember –identity “groupname” | ft name, primarysmtpaddress, alias, samaccountname | Export-CSV c:\groupname.csv