How to Use Get-MailboxRepairRequest Cmdlet in Exchange Server?
Summary: The Get-MailboxRepairRequest is a PowerShell cmdlet that is used to view the status and other details of mailbox repair requests initiated by using the New-MailboxRepairRequest cmdlet. In this post, we have discussed how to use the Get-MailboxRepairRequest cmdlet with various parameters. We have also mentioned an Exchange repair software that can easily selectively recover mailboxes from Exchange database without any data loss.
Mailboxes in Exchange Server database may get corrupted due to various internal and external factors. To repair the corrupted mailboxes, you can use the New-MailboxRepairRequest PowerShell cmdlet. This cmdlet can be used to repair a single or all the mailboxes in a database. However, after the running the repair cmdlet, there is no option to see the status or progress of the mailbox repair requests initiated by this cmdlet. To get information about the current repair requests, Exchange Server provides the Get-MailboxRepairRequest cmdlet. This cmdlet is available in on-premises Exchange Server 2013, 2016, and 2019.
The Get-MailboxRepairRequest PowerShell cmdlet helps you to find out if the mailbox repair requests are in-progress, queued, running, succeeded, or failed. In addition, the cmdlet displays the following information:
- GUID of the mailbox.
- Type of corruption, specified when the repair request was created.
- Repair request progress in terms of percentage of completion.
- Number of corruption issues detected and resolved.
- Time and date when the repair request was created and finished.
You can also use various parameters with the cmdlet to get specific information. Below, we will discuss how to use the Get-MailboxRepairRequest PowerShell cmdlet in Exchange Server.
Using the Get-MailboxRepairRequest Cmdlet in Exchange Server
To use the Get-MailboxRepairRequest cmdlet, you (the user account) must have the required roles and permissions assigned. For example, the Databases and Mail Recipients roles must be assigned.
After ensuring that the required roles and permissions are assigned, open the Exchange Management Shell (EMS) as administrator. To fetch information about a particular mailbox, run thecmdlet as given below:
Get-MailboxRepairRequest –Mailbox <mailbox identity>
This cmdlet will display the following information:
- Identity: The identity property of the mailbox repair request.
- Task: The corruption type for which the mailbox repair request was created.
- Job State: It displays the request status, such as Queued, In Progress, Succeeded, and Failed.
- Progress: The progress status of the repairing process in percentage.
If you want to get the Identity property of all the repair requests, you can run the cmdlet as given below:
Get-MailboxDatabase | Get-MailboxRepairRequest | Format-Table Identity
If you want to get information about a particular mailbox repair request returned by the above cmdlet, use the below cmdlet:
Get-MailboxRepairRequest -Identity 5b8ca3fa-8227-427f-af04-9b4f206d611f\335c2b06-321d-4e73-b2f7-3dc2b02d0df5\374289de-b899-42dc-8391-4f8579935f1f | Format-List
You can also use various other parameters with the Get-MailboxRepairRequest to get specific information, such as:
1. –Archive Parameter
If you’ve included the archive mailbox when creating the mailbox repair request, you can use the -Archive parameter with the cmdlet to get details of the associated archive mailbox (see the below example).
Get-MailboxRepairRequest –Identity <Identity> -Archive
2. –Database Parameter
To get the information about the repair requests of all the mailboxes in a database, you use the -Database parameter with the Get-MailboxRepairRequest cmdlet (see the below example).
Get-MailboxRepairRequest –Database <Database identity>
Note: You cannot use this parameter with the Identity or Mailbox parameters.
What if the Cmdlet shows the Mailbox Repair Request Status as Failed?
If the Get-MailboxRepairRequest PowerShell cmdlet shows the Job State status as Failed against a mailbox(s), then there is some major issue with the mailbox. In such a case, you can restore the mailbox from a healthy backup (if you’ve a granular backup) or the entire database. If this is not possible, you can use the ESEUtil cmdlets to repair and recover the database. However, the best option is to use a trustworthy third-party Exchange Server recovery tool, such as Stellar Repair for Exchange. This tool can open the Exchange database (EDB) file of any size and recover the mailboxes and other items. You can then granularly export the recovered mailboxes directly to a live Exchange Server database. It can also export the EDB data to PST and Microsoft 365. This tool shows the real-time progress status of the repair and recovery process. It supports all the versions of Exchange Server – 2019, 2016, 2013, and earlier.
Conclusion
The Get-MailboxRepairRequest PowerShell cmdlet is used to view the status and other details of the mailbox repair requests that are being created using the New-MailboxRepairRequest cmdlet. Above, we have explained how to use the Get-MailboxRepairRequest cmdlet in Exchange Server. In case the cmdlet shows the repair request Job State against a mailbox as failed, then you need to check and resolve the issues with the mailbox or the database containing the mailbox. Alternatively, you can use an Exchange repair tool, such as Stellar Repair for Exchange to repair the corrupt Exchange databases and recover the mailboxes. The recovered mailboxes can be directly exported to a live Exchange Server database.
You saved my lot of time.