Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Exchange / New-MailboxRepairRequest: Fixing Corrupted Mailboxes in Exchange 2016/2013/2010

March 5, 2018 Exchange

New-MailboxRepairRequest: Fixing Corrupted Mailboxes in Exchange 2016/2013/2010

Exchange administrators often have to deal with various damages and logical errors in users’ mailboxes. Such logical errors appear in such problems as synchronization errors, Outlook hangs, incorrect representation of the folder items, wrong items number, search and public folders errors, etc.

These errors mostly occur due to failures on the Outlook, in case when client incorrectly updates MAPI flags during mailbox folders elements processing. Most often, this happens with shared mailboxes which is used by several users simultaneously. In most cases, the user may not even be aware of the presence of errors in the connected mailbox or folders, formally everything is working fine. However, with some errors, the user may experience problems while accessing the mailbox or certain folders, viewing or deleting emails or folders, etc.

If the user encounters such problems, the administrator of the Exchange server should use one of three following ways to restore such a damaged mailbox.

  • Importing data from Outlook running in cached mode to a .PST file, removing and re-creating a new mailbox for “problem” user, and finally importing data from the PST file to the new Exchange mailbox. This method assumes a certain amount of manual manipulation on the user’s computer.
    Tip. How to import and export data to PST files in Exchange 2010/2013
  • Complete unmounting of mailbox store and checking it with Isinteg.exe (Information Store Integrity Checker) utility which allows to fix damages in Exchange base on application level. This method requires quite long mail service downtime for all users whose mailboxes are allocated in a disconnected database.
    Note. In some cases, you can try to move all user`s mailboxes to the “healthy” mailbox database. In this case, you can check store integrity without disabling a large number of users. However, this technique is not always applicable for various reasons.
  • Restore the Exchange database from backup, import data from a specific mailbox to PST file, and further data transfer to the re-created mailbox. This method has one disadvantage – all emails which got to the user`s mailbox after the last backup execution time can be lost.

Exchange server administrators had to use all methods described above up to Exchange 2010 SP1 release when more convenient functions appeared to restore the logical structure of the damaged mailbox – the new PowerShell cmdlet New-MailboxRepairRequest. This cmdlet allows you to find and fix all logical errors and corruptions in the Exchange database on the application level. You can search and fix all errors for both a certain mailbox and all mailboxes in the database.

In addition, when you use the New-MailboxRepairRequest cmdlet, you do not need to completely take the mail database to offline mode. Only one mailbox for each database is unavailable, the one for which the verification and integrity is currently being performed. Before performing any of described above radical ways to restore of mailbox integrity you should definitely try to use this PoSh command.

You can use this cmdlet to find, repair, and monitor corrupted mailboxes in all supported versions of Exchange 2010, 2013, and 2016.

The syntax of New-MailboxRepairRequest cmdlet is as follows:

New-MailboxRepairRequest -Mailbox  -CorruptionType <MailboxStoreCorruptionType[]> [-Archive ] [-Confirm []] [-DetectOnly ] [-DomainController ] [-WhatIf []]

Cmdlet allows you to find and fix the following corruption types in Exchange mailboxes:

  • SearchFolder – errors in search folders;
  • AggregateCounts – check and correction on the number of items in folders and their sizes;
  • FolderView – incorrect content represented by folder views;
  • ProvisionedFolder – folder logical structure damage.

Using the DetectOnly parameter, you can check one mailbox or mailbox database without performing any actions, for example:

New-MailboxRepairRequest -Mailbox woshub -DetectOnly -CorruptionType ProvisionedFolder, SearchFolder

The following example will start the process of woshub user mailbox analysis and recovery for all 4 types of damage.

New-MailboxRepairRequest -Mailbox woshub -CorruptionType ProvisionedFolder, SearchFolder, AggregateCounts, Folderview

The following example will start the process of woshub user mailbox analysis and recovery for all 4 types of damage:

New-MailboxRepairRequest -Database “NYMailBase1” -CorruptionType ProvisionedFolder, SearchFolder, AggregateCounts, Folderview

The command runs in background mode and its results are not displayed in the PowerShell console. You can trace it by the taskID (RequestID) or / and with the help of Windows event log (event source: MSExchangeIS Mailbox Store; EventID 10059 – repair request start; EventID 10048 successful completion of the repair request).

The following EventIDs can also be useful (for ease of tracking the recovery procedure for Exchange mailboxes, you can combine them into a custom event view with the source MSExchangeIS Mailbox Store)

  • 10044 – The mailbox repair request failed for provisioned folders
  • 10045 – The database repair request failed for provisioned folders
  • 10046 – The provisioned folders repair request completed successfully
  • 10047 – A mailbox-level repair request started
  • 10048 – The repair request successfully completed
  • 10049 – The mailbox or database repair request failed because Exchange encountered a problem with the database or another task is running against the database
  • 10050 – The mailbox repair request task skipped a mailbox
  • 10051 – The database repair request was cancelled because the database was dismounted.
  • 10059 – A database-level repair request started
  • 10062 – Corruption was detected
  • 10064 – A Public Folder repair request started
Tip. Special cmdlet Get-MailboxRepairRequest appeared in Exchange 2013, which allows you to get the status of the mailbox repair task.

repair corrupted mailbox in exchange 2013

One of the features of the New-MailboxRepairRequest cmdlet – after it is started, the mailbox repair process cannot be interrupted without stopping the Exchange Information Store service and unmounting the mailbox database.

If there are several mailbox databases on the server, in order to maintain the performance of the Exchange server, it is not recommended to run New-MailboxRepairRequest at the same time for a large number of databases (although only one MailboxRepairRequest process is supported for one database and up to 100 repair requests per server).

Let`s look at one small case as a practice-oriented example of cmdlet usage.

The Exchange 2016 user encountered the inability to view messages in one of the Outlook folders. Appointed folder was recovered from mailbox backup. However it’s appeared impossible to delete this folder with a help of Outlook / Outlook Web App / MFCMAPI (soft or hard deletion). When you try to delete a folder in Outlook 2016, you receive the following error:

Cannot delete this folder. Right-click the folder, and then click Properties to check your permissions for this folder. See the folder owner or your administrator to change your permissions.

Outlook is synchronizing local changes made to items in this folder. You cannot remove this folder until the synchronization with the server is complete

Cannot delete this folder. Outlook Error

To check and restore the Exchange mailbox integrity, the following PoSh command was run:

New-MailboxRepairRequest -Mailbox accounts@woshub.com -CorruptionType ProvisionedFolder,SearchFolder,AggregateCounts,Folderview

Powershell cmdlet New-MailboxRepairRequest in Exchange2013 After the successful completion of recovery operation (eventid 10048), the corrupted folder immediately disappeared from Outlook Web App. As for the Outlook, here we had to delete local cache (ost file) for correct mailbox display.

15 comments
1
Facebook Twitter Google + Pinterest
previous post
Booting Windows 7 / 10 from GPT Disk on BIOS (non-UEFI) systems
next post
Installing KMS Server on Windows Server 2012 R2

Related Reading

Send from Alias (SMTP Proxy Address) in Exchange...

April 6, 2023

How to Use Plus Addressing in Microsoft 365...

April 5, 2023

Save Sent Items in Shared Mailbox on Exchange...

April 3, 2023

Exchange Offline Address Book Not Updating in Outlook

March 21, 2023

How to Block Sender Domain or Email Address...

February 15, 2023

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Configuring Event Viewer Log Size on Windows

    May 24, 2023
  • How to Detect Who Changed the File/Folder NTFS Permissions on Windows?

    May 24, 2023
  • Enable Single Sign-On (SSO) Authentication on RDS Windows Server

    May 23, 2023
  • Allow Non-admin Users RDP Access to Windows Server

    May 22, 2023
  • How to Create, Change, and Remove Local Users or Groups with PowerShell?

    May 17, 2023
  • Fix: BSOD Error 0x0000007B (INACCESSABLE_BOOT_DEVICE) on Windows

    May 16, 2023
  • View Success and Failed Local Logon Attempts on Windows

    May 2, 2023
  • Fix: “Something Went Wrong” Error When Installing Teams

    May 2, 2023
  • Querying Windows Event Logs with PowerShell

    May 2, 2023
  • Configure Windows LAPS (Local Administrator Passwords Solution) in AD

    April 25, 2023

Follow us

  • Facebook
  • Twitter
  • RSS
Popular Posts
  • Configuring Anti-Spam Protection on Exchange 2013, 2016 – RBL Providers
  • How to Import and Export Mailbox to PST in Exchange 2016/2013/2010?
  • Get-MessageTrackingLog: Search Message Tracking Logs on Exchange Server
  • Exchange Error “452 4.3.1 Insufficient system resources”
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top