Quantcast
Channel: Exchange Server 2013 - Administration, Monitoring, and Performance forum
Viewing all articles
Browse latest Browse all 1453

How to export directly primarysmtpaddress for mailbox set in managedby attibut of DL.

$
0
0

Hi,

I'm trying to export list of ManagedBy configuration for all Exchange OnPremise DL in a CSV, directly with the primarysmtpaddress for all mailbox set in managedby.
By default we have only the identity, and i can't use this information in Office 365.

I have try with different script, but i can't have the primarysmtpaddress.
This one give me only the primarysmtpaddress for the last DL in the list :
Get-DistributionGroup | Select Name,@{n="managedby";e={(Get-mailbox ($_ | select -ExpandProperty Managedby).name) | select -expandproperty primarysmtpaddress}}

This one work but export only the name of the managedby:
Get-DistributionGroup | Select Name,@{n="managedby";e={(($_ | select -ExpandProperty Managedby).name)}} | Export-csv c:\temp\DLSet.csv

Did you have a solution?

Thanks,


Viewing all articles
Browse latest Browse all 1453

Trending Articles



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