Tag Archives: Get-MailboxStatistics

Office365 PowerShell: How to the find out mailbox sizes in Office365 (and Exchange 2016) using PowerShell

office365 powershell

In this post I’ll look at how to find out the mailbox sizes in Office365 using PowerShell.

I’m working with a few more companies now who use Office365 so I thought I would look at how to perform a few general Exchange administration tasks in Office365 using PowerShell so that I can manage and maintain them more easily.

Note: the steps below also work for Exchange 2016.

Continue reading

Exchange PowerShell: How to find the mailbox sizes in Exchange 2010

Exchange PowerShellFollowing on from a previous article on how to find out mailbox sizes in Exchange 2007 found here, the syntax is a little different for Exchange 2010. Below are a few scripts that will help with Exchange 2010 reporting.

Get-Mailbox will show you mailbox name, alias, server and prohibit send quota. It’s a start, but no information on mailbox sizes.

Exchange 2010 Get-Mailbox

Using the first script from the Exchange 2007 post you need to add the -server switch, Get-MailboxStatistics -server SERVERNAME | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label=”TotalItemSize(MB)”;expression={$_.TotalItemSize.Value.ToMB()}},ItemCount to get the following report.

Exchange 2010 Get-MailboxStatistics

By adding a redirect you can output the report details to a text file.

Get-MailboxStatistics -server SERVERNAME | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label=”TotalItemSize(KB)”;expression={$_.TotalItemSize.Value.ToKB()}},ItemCount > c:\reports\mailbox_sizes.txt

Exchange 2010 Get-MailboxStatistics Report

Related Posts:

1. How to install Exchange 2010 (SP3) on Windows Server 2012

2. Office365 PowerShell: How to the find out mailbox sizes in Office365 (and Exchange 2016) using PowerShell

3. MSExchangeIS Event ID 9646: mapi session exceeded the maximum of 500 objects of type “objtFolderView” on Exchange Server 2010

4. Exchange PowerShell: How to enumerate and modify Distribution Group properties

5. How to install Exchange 2013 (SP1) on Windows Server 2012 R2

Exchange PowerShell: How to find out mailbox sizes in Exchange 2007

Exchange PowerShellFor a meeting i wanted to prepare some stats on mailbox sizes, each time I have to do this i find myself doing the same google search and going back to the same webpage.

Neil Hobson has produced a great article which you can find here. Below is some code based on his work, modified to show sizes in MB rather than KB. Thanks Neil.

Copy and paste either of the scripts below into the Exchange Management Shell.

The script below will show all mailbox sizes in descending order in MB.

Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label=”TotalItemSize(MB)”;expression={$_.TotalItemSize.Value.ToMB()}},ItemCount

If you want to output this to a text file add > C:\temp\maibox_sizes.txt to the end so it looks like this.

Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label=”TotalItemSize(KB)”;expression={$_.TotalItemSize.Value.ToKB()}},ItemCount > c:\temp\mailbox_sizes.txt

For Exchange 2010 take a look at the article here.

Related Posts:

1. How to install Exchange 2010 (SP3) on Windows Server 2012

2. Office365 PowerShell: How to the find out mailbox sizes in Office365 (and Exchange 2016) using PowerShell

3. MSExchangeIS Event ID 9646: mapi session exceeded the maximum of 500 objects of type “objtFolderView” on Exchange Server 2010

4. How to install Exchange 2013 (SP1) on Windows Server 2012 R2