About Us    |    Contact Us

Repair Exchange Database Using PowerShell

Exchange server is a collaborative mail server that stores entire data in Extensible Storage Database File (.edb file). There are many logical and physical issues that can affect the edb file and interrupt the working of the operations of edb file. In such situation Exchange Administrator need to resolve the issues behind edb file corruption. Microsoft provides a command line to resolve the exchange errors so in this blog I am going to discuss how to use new-mailboxrepairrequest to repair the exchange database file and fix the issues.

Repair Exchange Database File Manually

Before running the Repair request you need to run first Get-MailboxRepairRequest cmdlet which will display the information about the exchange mailbox and after that run the New-MailboxRepairRequest to repair the database and fix the error.

Get-MailboxRepairRequest will Display: -

  1. GUID of the Mailbox.
  2. Amount of corruption detected.
  3. Progress of Repair request completion in percentage.
  4. Status of Repair request is failed or succeeded.
  5. Shows Date and Time when repair request was made and is completion time as well.
  6. Type of corruption found when repair command is executed on exchange mailbox.

The New-MailboxRepairRequest will Fix the Following Errors: -

Now run the command to view the level of corruption and detect the corruption issues.

New-MailboxRepairRequest –Mailbox Mack–CorruptionTypeProvisionedFolder,SearchFolder,SearchFolder,AggergateCount,FolderView-DetectOnly

  1. Fix the Folder View Corruption
    Run the command given below to fix the folder view type corruption in the exchange mailbox.
          New-MailboxRepairRequest –Mailbox Mack –CorruptionType FolderView
  2. Run this Command to fix Aggregate Count Corruption Issue Run the command given below to fix the aggregate count type corruption in the exchange mailbox.
          New-MailboxRepairRequest –Mailbox Mack –CorruptionType AggregateCount
  3. Run the Repair Command to Resolve Error
    Now run the command given below to repair the exchange database file and fix the associated error and archive the database.
          New-MailboxRepairRequest –Mailbox Mack -CorruptionTypeProvisionedFolder,SearchFolder,SearchFolder,AggergateCount,FolderView- Archive

Note: - If the New-MailboxRepairRequest command does not show any result then you need to fetch the event log application from Microsoft Exchange Server and you need to specify the a particular recovery for the event id shown in the exchange event log file, some event id's given below with their status.

When you will execute the New-MailboxRepairRequest one of the message will appear with the event id. If you are getting the Event ID 10049 it shows that the repair request unable to proceed and in such situation you will have to use Exchange Recovery Software to fix repair the exchanger mailbox and fix the error. This software will detect the corruption in mailbox and then fix all the issues easily.