question

RogerRoger-2394 avatar image
0 Votes"
RogerRoger-2394 asked ·

Get-MailboxStatistics

Hi All

i am using exchange 2010 hybrid envioronment, we create users in onprem and migrate it to cloud. i have DL's in onprem and cloud, i have shared mailboxes created in onprem and migrated to cloud. I want to export list of mailboxes, shared mailboxes, DL's and unified groups to csv file.
I want to export DisplayName, PrimarySMTPAddress, email address & upn to csv file. Experts help me with the syntax.

office-exchange-server-administrationoffice-exchange-online-itprooffice-exchange-hybrid-itpro
· 4
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

You want the primary SMTP, email address and UPN of the user connected to the mailbox? What do you want with the DL's and unified groups?

0 Votes 0 ·

Hi @RogerRoger-2394
According to your description, this question seems to be related to Exchange, so we would move the irrelevant tags.

0 Votes 0 ·

Hi @RogerRoger-2394

Have you tried the commands below in your environment?

0 Votes 0 ·

Hi @RogerRoger-2394 , is there any update about your issue?

0 Votes 0 ·

1 Answer

joyceshen-MSFT avatar image
0 Votes"
joyceshen-MSFT answered ·

Hi @RogerRoger-2394

Check if below commands work for you:

 Get-mailbox -RecipientTypeDetails UserMailbox | Select DisplayName, PrimarySmtpAddress, EmailAddresses, UserPrincipalName | Export-csv C:\test\usermailboxes.csv -NoTypeInformation
 Get-mailbox -RecipientTypeDetails sharedmailbox | Select DisplayName, PrimarySmtpAddress, EmailAddresses, UserPrincipalName | Export-csv C:\test\sharedmailboxes.csv -NoTypeInformation
 Get-DistributionGroup | Select DisplayName, PrimarySmtpAddress, EmailAddresses | Export-csv C:\test\DLs.csv -NoTypeInformation
 Get-UnifiedGroup | Select DisplayName, PrimarySmtpAddress, EmailAddresses | Export-csv C:\test\Unifiedgroups.csv -NoTypeInformation

You will get CSV file like below:

35537-qa-2020-10-28-13-29-08.png



If an Answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
 


· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.