Find folder in mailbox

How Can We Help?

You are here:
< Back

From time to time I receive a support ticket to restore a mailbox folder or items because they have gone missing. In literally 99% of cases the missing mailbox contents can be found by using a search, avoiding the need to perform a mailbox recovery. Often the cause of the missing folder or items is that they have simply been moved to another folder in the mailbox by accident.

One of the search techniques I use involves the Get-MailboxFolderStatistics cmdlet.

You may be wondering why I’m not using the Get-MailboxFolder cmdlet instead. The answer is that the Get-MailboxFolder cmdlet works when the mailbox owner runs it. This is explained in more depth here.

Anyway, Get-MailboxFolderStatistics works perfectly fine for this type of scenario where you are looking for a folder name.

Let’s say that a customer reports they are missing a folder named “Invoices”. You can perform a Get-MailboxFolderStatistics query for mailboxes that match the name “Invoices”, for example:

[PS] C:>Get-MailboxFolderstatistics -Identity alan.reid | Where {$_.Name -Match "Invoices"}

If there are any matches you’ll see a result such as this:

RunspaceId                        : 13f46c2a-fe30-4a26-aaf3-35802e4844b8
Date                              : 22/01/2013 10:35:05 PM
Name                              : Invoices
FolderPath                        : /Folders/Project Matters/01. Construction/Invoices
FolderId                          : LgAAAVBUeIJL9KbERYxlSZYX1as2AQAe/v3fqiJWHJJazVoxVJTnACsOCIAqAAAB
FolderType                        : User Created
ItemsInFolder                     : 34
DeletedItemsInFolder              : 0
FolderSize                        : 3.516 MB (3,686,955 bytes)
ItemsInFolderAndSubfolders        : 34
DeletedItemsInFolderAndSubfolders : 0
FolderAndSubfolderSize            : 3.516 MB (3,686,955 bytes)
OldestItemReceivedDate            :
NewestItemReceivedDate            :
OldestDeletedItemReceivedDate     :
NewestDeletedItemReceivedDate     :
OldestItemLastModifiedDate        :
NewestItemLastModifiedDate        :
OldestDeletedItemLastModifiedDate :
NewestDeletedItemLastModifiedDate :
ManagedFolder                     :
TopSubject                        :
TopSubjectSize                    : 0 B (0 bytes)
TopSubjectCount                   : 0
TopSubjectClass                   :
TopSubjectPath                    :
TopSubjectReceivedTime            :
TopSubjectFrom                    :
TopClientInfoForSubject           :
TopClientInfoCountForSubject      : 0
SearchFolders                     : {AllItems, Reminders, To-Do Search, Restriction(1-61B5D4A3), Tracked Mail Processin
                                    g}
Identity                          : alan.reidFoldersProject Matters�1. ConstructionInvoices
IsValid                           : True

The FolderPath and Identity both give you the path to the folder in the mailbox.

FolderPath                        : /Folders/Project Matters/01. Construction/Invoices
Identity                          : alan.reidFoldersProject Matters�1. ConstructionInvoices

Ask the customer if that is the folder they are missing. If it is then you’ve saved yourself a lot of effort, and saved them a lot of time waiting for a restore to be performed.