Skip to main content Skip to footer

Why do content reports return fewer items than PowerShell?

Promodag Reports contains several reports to show the size of a mailbox and the number of its items in the Storage and Mailbox Content categories. However, you will notice discrepancies in the results. Here is the explanation.

Mailbox size: a relative concept

First of all, it is probably not an exaggeration to say that the notion of mailbox size is quite subjective since the mailbox structure consists of all kinds of elements and folders visible and invisible to the end user.

Both are recommended readings.

From the PowerShell side

PowerShell provides two main commands to perform this search:

  1. The PowerShell cmdlet Get-EXOMailboxStatistics defaults to retrieving the size of the IPM subtree, but it is not clear which folders it considers.
  2. The PowerShell cmdlet Get-EXOMailboxFolderStatistics retrieves the list of folders, with their size and number of items.

If you run these two commands on a mailbox, you will get different results.

  • Get-EXOMailboxStatistics returns inferior results to Get-MailboxFolderStatistics, that lists invisible folders in Outlook: PersonMetadata, Recipient Cache, Audits, Purges etc.
  • Furthermore, Get-MailboxFolderStatistics also returns results that do not match what you can see in Outlook. The underlying reason for this discrepancy is not clear.

From the Promodag Reports side

Now here's what Promodag Reports does if you look under the hood:

So to summarize, Promodag Reports exploits the properties of the folders visible by the user in Outlook and returns the size and number of items as Outlook presents them. In the case of Mailbox Content Summary, or Item Breakdown by Age, some items are ignored due to the lack of delivery date in the mailbox.

Let’s compare!

To verify these statements, perform the following test on a random (and preferably used) mailbox:

  1. Run this command and write down how many items you get: Get-EXOMailboxStatistics -Identity <email address of the mailbox>
  2. Run this one, retrieve the output file in C:\Temp and sum up the item count in Excel: Get-EXOMailboxFolderStatistics -<email address of the mailbox>| Select Name,FolderSize,ItemsinFolder | export-csv "C:\Temp\MailboxFolderStatistics.csv" -delimiter ';' -Encoding UTF8
  3. Run the Mailbox Content Summary report on the mailbox;
  4. Run the Mailbox Folder Size report on the mailbox.

You can expect to get four different results although quite close. The report that should return the closest result to what you see in the Outlook client is Mailbox Folder Size, but it is clear from reading the articles linked above that this is all relative.

Conclusion

We will endorse the conclusion of Tony Redmond in his above-mentioned article:

"It’s difficult to figure out the exact size for an Exchange Online mailbox on disk. Suffice to say that it’s larger than you think, but as Microsoft doesn’t document how it stores application data inside mailboxes, all we can do is test, observe, and speculate".

Try Promodag Reports Free for 45 Days

Cookie Notice

Find out more about how this website uses cookies to enhance your browsing experience.