Get-MailboxFolderStatistics wrong output?
I was recently working on an environment where the item counts inside the folders were not showing up the actual number as the count. It was always shows a couple of items more than what it was in the folder. Some time more than 10. Can be many... In my case its 484 (may be more on your mailbox as well...)
After banging my head over why it is showing extra count, we started looking at the TechNet for Get-MailboxFolderStatistics. TechNet clearly mentioned that the count will include hidden items as well.
A mailbox can have hidden items that are never visible to the user and are only used by applications. The Get-MailboxFolderStatistics cmdlet can return hidden items for the following values: FolderSize, FolderAndSubfolderSize, ItemsInFolder, and ItemsInFolderAndSubfolders.
So, got more curios about what was actually a hidden item. Digged in a little deeper using one of my favorite tool MFCMAPI.
Make sure the Outlook is in Online mode while you open up MFCMAPI.
Open MFCMAPI, click on Session > Logon
Select the outlook profile if it prompts you for the Account to log into.
Expand "Root Container"
Expand "Top of Information Store"
Right click on the folder which you want to find out hidden messages about.
Click on "Open Associated Contents table"
Once you click on it, it opens up another window which will contain all the hidden messages.
It contains hidden messages such as Rules (mailbox rules), User Profile information, Retention Policies that user might have etc.
The Message Class column of the window would give us a pretty close idea about what those messages are meant for.
Most of these would be information that the mailbox would need for its configuration. Users/Administrators do not have to worry about what each of these messages contain.
For more information, refer https://technet.microsoft.com/en-us/library/aa996762(v=exchg.150).aspx
Comments
- Anonymous
August 12, 2016
I'm not at all worried about what the hidden messages contain. I am concerned with how to get the actual number of non-hidden items in a mailbox or folder. What's the use of statistics if they contain extraneous information that nobody should be concerned with?- Anonymous
September 22, 2016
Agreed, only admins/users need not be worried about it. Its still used by the system behind the scenes by the Exchange. Its just that Get-MailboxFolderStatistics tells you the actual truth on how many items are there inside the mailbox.
- Anonymous