Trying to get a list of ALL DLs (DGs) with their respective smtpaddress, don't care about their members. When I use:
(Get-DistributionGroup "testgroup").emailaddresses | Select smtpaddress | Export-Csv c:\path.csv -NoTypeInformation
I get the results I'm looking for...
"smtpaddress"
"address@company.com"
If I want to get ALL the DLs (DGs), I enter:
(Get-DistributionGroup).emailaddresses | Select smtpaddress | Export-Csv c:\path.csv -NoTypeInformation
I get this...
Warning: By default, only the first 1000 items are returned... blah blah blah. To return all items, specify "-ResultSize Unlimited".
So I enter...
(Get-DistributionGroup -ResultSize Unlimited).emailaddresses | Select smtpaddress | Export-Csv c:\path.csv -NoTypeInformation
I get no errors, it creates the .csv file but the file is blank.
Thanks,
Daniel
Thanks, Daniel