Quantcast
Channel: Exchange Server 2013 - General Discussion forum
Viewing all articles
Browse latest Browse all 4521

Exchange 2013, get all DLs with smtp address

$
0
0

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


Viewing all articles
Browse latest Browse all 4521

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>