Applies to: Exchange Server 2010 SP3, Exchange Server 2010 SP2

Topic Last Modified: 2012-07-23

Use the New-MailboxRepairRequest cmdlet to detect and repair mailbox corruptions. You can run this command against a specific mailbox or against a mailbox database. While this task is running, mailbox access is disrupted for the mailbox being repaired. If you're running this command against a mailbox database, only the mailbox being repaired is disrupted. All other mailboxes in the database remain operational.

Note:
You can't perform these procedures in the Exchange Management Console (EMC). You must use the Shell.

The New-MailboxRepairRequest cmdlet detects and repairs the following types of mailbox corruptions:

To avoid any performance problems, Exchange enforces limits on the number of simultaneous repair requests that can be submitted per server. Only one request can be active for a database-level repair; up to 100 requests can be active for a mailbox-level repair per server.

Note:
After you start the repair request, it can't be stopped unless you dismount the database. For more information, see Dismount a Database.

Looking for other management tasks related to creating a mailbox repair request? Check out Managing Repair Requests.

New-MailboxRepairRequest Output

When you run the New-MailboxRepairRequest cmdlet, the following output is displayed:

  • RepairTaskID   This value specifies a unique identifier for the repair task.

  • Mailbox   This value specifies the mailbox being repaired. If you specified a database-level repair, this value is blank.

  • Database   This value specifies the database that contains the mailbox being repaired.

  • Server   This value specifies the Mailbox server hosting the active copy of the database that contains the mailbox being repaired.

Use the Shell to detect corruptions and repair a mailbox

You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Mailbox repair request" entry in the Mailbox Permissions topic.

This example detects and repairs the folder view for the mailbox tony@contoso.com.

Copy Code
New-MailboxRepairRequest -Mailbox tony@contoso.com -CorruptionType FolderView

For detailed syntax and parameter information, see New-MailboxRepairRequest.

Use the Shell to detect corruptions and repair a set of mailboxes

You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Mailbox repair request" entry in the Mailbox Permissions topic.

This example detects and repairs all corruption types for mailboxes that have CustomAttribute2 set to Repair Required.

Copy Code
Get-Mailbox -Filter {CustomAttribute2 -like "Repair Required"} | New-MailboxRepairRequest -CorruptionType SearchFolder,AggregateCounts,ProvisionedFolder,FolderView

For detailed syntax and parameter information, see Get-Mailbox and New-MailboxRepairRequest.

Use the Shell to detect corruptions for a mailbox

You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Mailbox repair request" entry in the Mailbox Permissions topic.

This example detects and reports only on ProvisionedFolder and SearchFolder corruption issues in Ayla Kol's mailbox. This command doesn't repair the mailbox.

Copy Code
New-MailboxRepairRequest -Mailbox ayla -CorruptionType ProvisionedFolder,SearchFolder -DetectOnly

For detailed syntax and parameter information, see New-MailboxRepairRequest.

Use the Shell to repair all mailboxes in a database

You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Mailbox repair request" entry in the Mailbox Permissions topic.

This example detects and repairs the corruption type AggregateCounts for the mailbox database MBX-DB01.

Copy Code
New-MailboxRepairRequest -Database MBX-DB01 -CorruptionType AggregateCounts

For detailed syntax and parameter information, see New-MailboxRepairRequest.

Other Tasks

After you perform these procedures, you may also want to see which mailboxes had corruptions and were repaired. For details, see View Mailbox Repair Request Entries in Event Viewer.