Get-MailboxStatistics

Roger Roger 4,951 Reputation points
2020-10-27T20:34:33.91+00:00

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.

Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,193 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,358 questions
Microsoft Exchange Hybrid Management
Microsoft Exchange Hybrid Management
Microsoft Exchange: Microsoft messaging and collaboration software.Hybrid Management: Organizing, handling, directing or controlling hybrid deployments.
1,896 questions
{count} votes

Accepted answer
  1. Joyce Shen - MSFT 16,646 Reputation points
    2020-10-28T05:31:01.057+00:00

    Hi @Roger Roger

    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.
     

    0 comments No comments

0 additional answers

Sort by: Most helpful