Skip to content

Instantly share code, notes, and snippets.

@chadmando
Last active January 19, 2021 15:08
Show Gist options
  • Save chadmando/469d6684594b79efc4ceff8b19b8cece to your computer and use it in GitHub Desktop.
Save chadmando/469d6684594b79efc4ceff8b19b8cece to your computer and use it in GitHub Desktop.
Windows Powershell One-liner to get largest user mailboxes from Exchange Online
# First: Connect to Exchange Online using EXO V2
Get-ExoMailbox -RecipientTypeDetails Usermailbox |
Select-Object -Property Identity |
Get-EXOMailboxStatistics |
Select -Property DisplayName, TotalItemSize |
Sort-Object -Property TotalItemSize -Descending # |
# Out-File <path to file>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment