Note: This relates to Microsoft Exchange 2010 and 2013.
There are two way to find out the size of a user’s mailbox in Exchange. The first is using Exchange Management Console in Exchange 2010 or Exchange Control Panel (ECP) in Exchange 2013. The other way to do it is using Exchange Management Shell (EMS). The advantage of using the EMS is that you can not only obtain more information about a single user’s mailbox but you can also extract that information for multiple mailboxes and export that to a handy CSV file.
- Exchange 2010 – Management Console Method
- Exchange 2013 – ECP Method
- Exchange Management Shell Method
- Open the Exchange Management Console
- Expand the Server
- Expand “Recipient Configuration”
- Click on Mailbox
- Right click on the user
- The mailbox size will be displayed in KB in the General tab
- Open the Exchange Control Panel
- Log in with an Exchange Administrator account
- Click on “recipients”
- Click on the user and then click the pencil icon (or double click on the username)
- Click on “mailbox usage”
- The mailbox size and maximum size will be displayed
Using the Exchange Management Shell to get the mailbox sizes for users is a quicker and more efficient way to go about it. However, it helps to understand the process so I am going to step through each cmdlet and what it does before piping the cmdlets together to obtain the desired result.
If you are unsure about any of these commands or want to know more about their use you can use the cmdlet Get-Help followed by the cmdlet you want to know about. For example, Get-Help Get-MailboxDatabase.
This cmdlet retrieves information about the Exchange database objects from a server or organisation. If you run this with no parameters it will return the database names and the server that each is hosted on. For the purposes of this article we will only be using this to retrieve the database identity. This will be useful later in the article where we want to retrieve the mailbox information for all the users in a particular database.
This is the cmdlet that will retrieve information about a particular mailbox. There is a requirement to include at least the “-Identity” parameter in this cmdlet. With no additional parameters the cmdlet will return the DisplayName, ItemCount, StorageLimitStatus and LastLogonTime.
This is where we start drilling down to find the information we want. If you want to see all of the information that the Get-MailboxStatistics cmdlet returns you can pipe the format list command after it (Get-MailboxStatistics -Identity “username” | fl). We want the DisplayName, TotalItemSize and possibly the TotalDeletedItemSize if you are trying to clean up the Exchange database. To return this information you run the cmdlet as follows:
Get-MailboxStatistics -Identity “username” | Select DisplayName,TotalItemSize,TotalDeletedItemSize
Note that there are no spaces between the variables.
Now for the fun bit. If we pipe the Get-MailboxStatistics cmdlet into the Get-MailboxDatabase cmdlet we can retrieve the mailbox size for all the users in the Exchange organisation or just for a specific database within the organisation.
Get-MailboxDatabase -Identity “databasename” | Get-MailboxStatistics -Identity “username” | Select DisplayName,TotalItemSize,TotalDeletedItemSize
Finally, we want to be able to export that data to a CSV so that we can generate a nice, neat report for the higher ups to see. For this we need to use the Export-Csv cmdlet.
Get-MailboxDatabase -Identity “databasename” | Get-MailboxStatistics -Identity “username” | Select DisplayName,TotalItemSize,TotalDeletedItemSize | Export-Csv “C:\Reports\mailbox-sizes.csv”