Exchange 2010: View Mailbox and Folder size


Largest Mailbox Folders in Size

Show top ten largest Mailbox folders on the Mailbox Server sorted by size. (Observe that this is a resource intensive cmdlet if you have a lot of Mailboxes on the selected Server)

Get-Mailbox –Server ‘lab3-sv-exm-01’ -ResultSize Unlimited | Get-MailboxFolderStatistics -FolderScope All | Sort-Object FolderSize -Descending | Select-Object -First 10 | FT Identity,FolderSize,ItemsInFolder –wrap


Show top ten largest Mailbox folders on the Mailbox Server sorted by size for the Archive Mailboxes. (Observe that this is a resource intensive cmdlet if you have a lot of Mailboxes on the selected Server)

Get-Mailbox –Server ‘lab3-sv-exm-01’ -ResultSize Unlimited | Get-MailboxFolderStatistics -Archive -FolderScope All | Sort-Object FolderSize -Descending | Select-Object -First 10 | FT Identity,FolderSize,ItemsInFolder –wrap

Show top ten largest Mailbox folders on a specified Database sorted by size. (Observe that this is a resource intensive cmdlet if you have a lot of Mailboxes in the specified Database)

Get-Mailbox –Database ‘Database1’ -ResultSize Unlimited | Get-MailboxFolderStatistics -FolderScope All | Sort-Object FolderSize -Descending | Select-Object -First 10 | FT Identity,FolderSize,ItemsInFolder –wrap

Show top ten largest Mailbox folders on a specified Database sorted by size for the Archive Mailboxes. (Observe that this is a resource intensive cmdlet if you have a lot of Mailboxes in the specified Database)

Get-Mailbox –Database ‘Archive-Database1’ -ResultSize Unlimited | Get-MailboxFolderStatistics -Archive -FolderScope All | Sort-Object FolderSize -Descending | Select-Object -First 10 | FT Identity,FolderSize,ItemsInFolder –wrap

Show top ten largest Mailbox folders for a single User sorted by size.

Get-Mailbox -Identity ‘User1’ -ResultSize Unlimited | Get-MailboxFolderStatistics -FolderScope All | Sort-Object FolderSize -Descending | Select-Object -First 10 | FT Identity,FolderSize,ItemsInFolder –wrap

Show top ten largest Mailbox folders for a single User sorted by size for the Archive Mailbox.

Get-Mailbox -Identity ‘User1’ -ResultSize Unlimited | Get-MailboxFolderStatistics -Archive -FolderScope All | Sort-Object FolderSize -Descending | Select-Object -First 10 | FT Identity,FolderSize,ItemsInFolder –wrap

Most Items in an single Mailbox Folder

Show top ten Mailbox folders with most Items on the Mailbox Server sorted by items count. (Observe that this is a resource intensive cmdlet if you have a lot of Mailboxes on the selected Server)

Get-Mailbox –Server ‘lab3-sv-exm-01’ -ResultSize Unlimited | Get-MailboxFolderStatistics | Sort-Object ItemsInFolder –Descending | Select-Object -First 10 | FT Identity,ItemsInFolder,FolderSize –Wrap

Show top ten Mailbox folders with most Items on the Mailbox Server sorted by items count for the enabled Archive Mailboxes. (Observe that this is a resource intensive cmdlet if you have a lot of Mailboxes on the selected Server)

Get-Mailbox –Server ‘lab3-sv-exm-01’ -ResultSize Unlimited | Get-MailboxFolderStatistics -Archive | Sort-Object ItemsInFolder –Descending | Select-Object -First 10 | FT Identity,ItemsInFolder,FolderSize -Wrap

Show top ten Mailbox folders with most Items on a specified Database sorted by items count. (Observe that this is a resource intensive cmdlet if you have a lot of Mailboxes in the specified Database)

Get-Mailbox –Database ‘Database1’ -ResultSize Unlimited | Get-MailboxFolderStatistics | Sort-Object ItemsInFolder –Descending | Select-Object -First 10 | FT Identity,ItemsInFolder,FolderSize –wrap

Show top ten Mailbox folders with most Items on a specified Database sorted by items count for the enabled Archive Mailboxes. (Observe that this is a resource intensive cmdlet if you have a lot of Mailboxes in the specified Database)

Get-Mailbox –Database ‘Archive-Database1’ -ResultSize Unlimited | Get-MailboxFolderStatistics | Sort-Object ItemsInFolder –Descending | Select-Object -First 10 | FT Identity,ItemsInFolder,FolderSize –wrap

Show top ten Mailbox folders with most Items for a single User sorted by items count.

Get-Mailbox -Identity ‘User1’ -ResultSize Unlimited | Get-MailboxFolderStatistics | Sort-Object ItemsInFolder –Descending | Select-Object -First 10 | FT Identity,ItemsInFolder,FolderSize –wrap

Show top ten Mailbox folders with most Items for a single User sorted by items count for the enabled Archive Mailbox.

Get-Mailbox -Identity ‘User1’ -ResultSize Unlimited | Get-MailboxFolderStatistics -Archive | Sort-Object ItemsInFolder –Descending | Select-Object -First 10 | FT Identity,ItemsInFolder,FolderSize –wrap

Largest Specified Mailbox Folder in Size

The following folders are supported in the ‘FolderScope’: All, Calendar, Contacts, ConversationHistory, DeletedItems, Drafts, Inbox, JunkEmail, Journal, ManagedCustomFolder, Notes, Outbox, RecoverableItems, RssSubscriptions, SentItems, SyncIssues, Tasks.

Show the largest specified Mailbox Folder in size on a Mailbox Server sorted by size and sends the output to a text file. (Observe that this is a resource intensive cmdlet if you have a lot of Mailboxes on the selected Server)

Get-Mailbox –Server ‘lab3-sv-exm-01’ -ResultSize Unlimited | Get-MailboxFolderStatistics -FolderScope DeletedItems | Select Identity, ItemsInFolder, FolderSize, FolderType | Sort-Object FolderSize -Descending | FT –wrap > C:\logs\DeletedItems.txt

Show the largest specified Mailbox Folder in size on a Mailbox Server sorted by size for the enabled Archive Mailboxes and sends the output to a text file. (Observe that this is a resource intensive cmdlet if you have a lot of Mailboxes on the selected Server)

Get-Mailbox –Server ‘lab3-sv-exm-01’ -ResultSize Unlimited | Get-MailboxFolderStatistics -Archive -FolderScope DeletedItems | Select Identity, ItemsInFolder, FolderSize, FolderType | Sort-Object FolderSize -Descending | FT –wrap > C:\logs\DeletedItems.txt

Show the largest top ten specified Mailbox Folders in size on a Mailbox Server sorted by size. (Observe that this is a resource intensive cmdlet if you have a lot of Mailboxes on the selected Server)

Get-Mailbox –Server ‘lab3-sv-exm-01’ -ResultSize Unlimited | Get-MailboxFolderStatistics -FolderScope DeletedItems | Sort-Object FolderSize -Descending | Select-Object -First 10 | FT Identity,ItemsInFolder,FolderSize,FolderType -Wrap

You can exchange “Get-Mailbox –Server” with “Get-Mailbox –Database” and “Get-Mailbox – Identity” as showed in the previously examples. “Get-Mailbox” without parameters is also supported which will scan all your Mailbox Servers by it´s not recommended if you have large amount of Mailboxes as it´s really resource intensive process.

RecoverableItems Folder is known as the Dumpster and it includes the following folders:

RecoverableItemsRoot: “The Root folder holds stripped versions of calendar items.”

RecoverableItemsDeletions: “Items removed from the Deleted Items folder or hard-deleted from other folders are moved to this subfolder and are visible to the user when using the Recover Deleted Items tool in Outlook.”

RecoverableItemsPurges: “When a user deletes an item from the Recoverable Items folder the item is moved to the Purges folder. Items that exceed the deleted item retention period are also moved to the Purges folder. When the mailbox assistant processes the mailbox, items in the Purges folder are typically purged from the mailbox database. However, when you place the mailbox user on legal hold, the mailbox assistant does not purge items in this folder.”

RecoverableItemsVersions: “When a user who is placed on legal hold changes specific properties of a mailbox item, the original item is preserved to meet discovery obligations. A copy of the original mailbox item is created before the changed item is created, and this copy is saved in the Versions folder. This process is known as copy on write.”

Get-Mailbox –Server ‘lab3-sv-exm-01’ -ResultSize Unlimited | Get-MailboxFolderStatistics -FolderScope RecoverableItems | Sort-Object FolderSize -Descending | Select-Object -First 10 | FT Identity,ItemsInFolder,FolderSize,FolderType -Wrap


Largest Mailbox in Size

Show top ten Mailboxes in size on a Mailbox Server, sorted in descending order. (Observe that this is a resource intensive cmdlet if you have a lot of Mailboxes on the selected Server).

Get-Mailbox –Server ‘lab3-sv-exm-01’ -ResultSize Unlimited | Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | Select-Object -First 10 | FT DisplayName, ItemCount, TotalItemSize, DeletedItemCount, TotalDeletedItemSize



Show all Mailboxes on the Mailbox Server sorted by Mailbox size and sends the output to a text file. (Observe that this is a resource intensive cmdlet if you have a lot of Mailboxes on the selected Server)

Get-Mailbox –Server ‘lab3-sv-exm-01’ -ResultSize Unlimited | Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | FT DisplayName,ItemCount,TotalItemSize,DeletedItemCount,TotalDeletedItemSize,StorageLimitStatus > C:\logs\LargestMailbox.txt

In this example I included the “StorageLimitStatus” just to show you how easy you can spot users that have exceeded the Mailbox quota.

Picture is without the output to the text file.

Recommended limits for number of items in a mail folders, especially in the critical path folders that are Calendar, Contacts, Inbox, and Sent Item folder.

Exchange 2003, 5,000
Exchange 2007, 20,000
Exchange 2010, 100,000

Read a really good post from Elizabeth Ayer about the impact of folders with large amount of items.

All EMS commands are tested on Exchange 2010 SP1.

Advertisements
This entry was posted in Exchange 2010 and tagged , , , , , , , , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

11 Responses to Exchange 2010: View Mailbox and Folder size

  1. odarchuk says:

    Thanks!
    how to get the TOP 100 users for the parameters TotalDeletedItemSize and TotalItemSize ???

    • Hi odarchuk,

      For “TotalDeletedItemSize”:
      Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | Sort-Object TotalDeletedItemSize -Descending | Select-Object -First 100 | FT DisplayName, ItemCount, TotalItemSize, DeletedItemCount, TotalDeletedItemSize

      For “TotalItemSize”:
      Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | Select-Object -First 100 | FT DisplayName, ItemCount, TotalItemSize, DeletedItemCount, TotalDeletedItemSize

  2. Sean says:

    Thank you very much for posting this information in such a detailed and easy to understand manner.

  3. Niko says:

    Very helpful, thank you!

  4. Yassin says:

    Thank you very much.

    How do I filter the following command to get just Audits or Purges folders size;

    Get-Mailbox –Server ‘lab3-sv-exm-01′ -ResultSize Unlimited | Get-MailboxFolderStatistics -FolderScope RecoverableItems | Sort-Object FolderSize -Descending | Select-Object -First 10 | FT Identity,ItemsInFolder,FolderSize,FolderType -Wrap

  5. Tim says:

    Very well written article. Thank you !

  6. Excellent site you’ve got here.. It’s hard to find quality
    writing like yours nowadays. I truly appreciate
    people like you! Take care!!

  7. Carlo says:

    Heya just wanted to give you a quick heads up and let you know a few of the pictures aren’t loading correctly. I’m not sure why but I think its a linking issue.
    I’ve tried it in two different web browsers and both show the same results.

  8. Hi Carlo,

    Sorry but I see all the pictures,both with IE and Chrome, tried from two locations.

  9. Sandy says:

    Hey there! This is my first comment here so I just wanted to give a quick shout out and tell you I truly enjoy reading your posts.
    Can you recommend any other blogs/websites/forums that
    deal with the same topics? Thank you!

  10. Rod Newcomb says:

    Thanks for posting this thread! It was very helpful and you just saved me a lot of time!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s