I am trying to export a dynamic distribution group to a text file. I am able to export the Names but i need the users primary smtp address also, how do I apply that string in there as well.
here is what i have, im using two commands
$group = get-dynamicdistibutiongroup -identity "Exchange Email Users"
then i run
Get-Recipient -RecipientPreviewFilter $group.RecipientFilter | out-file c:\users.txt