Advertisement
goezler

Export a list of all mailboxes in Exchange

Nov 5th, 2021
398
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Get-MailboxDatabase | Get-MailboxStatistics | Export-CSV c:\temp\mailboxdata.csv
  2.  
  3. or
  4.  
  5. You can then be more specific about the data you want to output using any of the fields from the first command and put it in an order:
  6.  
  7. Get-MailboxStatistics -Database "Mailbox DB01" | Select DisplayName, ItemCount, TotalItemSize | Sort-Object TotalItemSize -Descending | Export-CSV c:\temp\mailboxdata.csv
  8.  
  9. or
  10. You can just leave out the database parameter if you want information on all mailbox databases:
  11.  
  12. Get-MailboxDatabase | Get-MailboxStatistics | Select DisplayName, ItemCount, TotalItemSize | Sort-Object TotalItemSize -Descending | Export-CSV c:\temp\mailboxdata.csv
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement