MFCMAPI corrupt mailbox items



MFCMAPI Removing Corrupt mailbox items

The Exchange synchronisation engine will try to synchronise all mail items during on-boarding but if it encounters any corrupt items and the baditemcount has not been modified, the action will fail with an error:

FailureContext                : --------
                                Operation: ISourceFolder.CopyTo
                                OperationSide: Source
                                Primary (5552a668-26e6-42af-9d67-552787eabd2f)
                                PropTags: [ContainerContents; FolderAssociatedContents; ContainerHierarchy; DisplayName; RulesTable; 1071710466]
                                --------
                                Folder: '/Top of Information Store/Deleted Items', entryId [len=46,
                                data=000000006E995C48951065418A2B1EBE623C6D850100882242EA481634449D0B8BFFA203DD8C000000C52EC70000], parentId [len=46,
                                data=000000006E995C48951065418A2B1EBE623C6D850100882242EA481634449D0B8BFFA203DD8C000000C52EC10000]
To solve this error we first need to attempt a mailbox repair using Powershell.
New-MailboxRepairRequest -Mailbox <name_of_mailbox> -CorruptionType  "SearchFolder, FolderView, AggregateCounts, ProvisionedFolder, MessagePtagCn, MessageId"


To monitor the restore request we need to examine the application context event logs on the mailbox server hosting the content.
Examine the event logs and see the result of the repair request:




Attempt the onboarding request again and examine the migration log. Any failures are likely to be corrupt items in the folder referenced in the failure log. In this example, there are multiple, corrupt items in the deleted items folder



It is likely that any attempt to delete these using Outlook will fail with the following message:







We will need to use the MFCMAPI tool to delete these objects.
Download the latest stable binaries of MFCMAPI from Sourceforge: https://github.com/stephenegriffin/mfcmapi/releases/tag/18.2.18068.37 (correct as of 10/4/2018)

Unzip the MFCMAPI and ensure that you have FullAccess permissions to the mailbox within Exchange. We will also need to ensure that cached Exchange mode is disabled to allow full availability of all mailbox contents.



Create an Outlook profile in the usual manner and open MFCMAPI with elevated privilege. Then click Session and Logon:






Select your Outlook profile and click OK











Double click the Object that is listed as the default store for the profile.







Expand Root Container > Top Of Information Store and right click the folder where the corrupted items are reportedly located and choose Open Contents table.




Locate the corrupted items from their time stamps and group select, right click and select Delete Message:










Select Permanent delete Passing DELETE_HARD_DELETE (unrecoverable) and click OK.













Now click Session and Logoff









Repeat the process until no migration errors are encountered when onboarding the mailbox to Exchange online.

MCSA Server 2016

After four years of putting it off, starting revising and then getting distracted by various life events, I managed to pass my latest MCSA examination.
Technology has certainly moved on since I sat and passed the 2003 version of this qualification with this exam delivered to the comfort of my own home. Yes, I decided to try the online proctored exam and after some trepidation I've decided that this is the future of IT testing.
Instead of the rigmarole of finding a test centre still offering testing services, then getting to the test centre on the day of the exam and sitting the test, we now have just the slight intrusion into your home of the human who will check your test work-space. Better have a quick tidy up to avoid any red faces. Its also a good idea to check your laptop and internet connection are up to the task of sustaining the recording of your head and shoulders while you sit the exam.
All told, I'm a fan of this new technology and am certain that I will use this to sit my next qualification, which will be Exchange 2016 (70-345) to complete my MCSE: Productivity.