Thursday, October 29, 2015

Repair Corrupt Exchange 2016 Mailbox: New-MailboxRepairRequest



I’ve already posted multiple ways to repair Exchange 2010/2013, but I never published how to repair a corrupt mailbox in Exchange 2016. Ofcourse, Exchange 2016 is very new topic among all Exchange administrators; still many of us are not aware with new changes in Exchange 2016. So before moving ahead, it is recommended to check what’s new in Exchange Server 2016

So today I’m shading light on repairing corrupt mailbox on Exchange Server 2016. However, Microsoft isn’t released Exchange 2016 yet, but still you can try its preview version to test new features and apply new PowerShell commands.

The PowerShell (cmdlet) use in the blog post is only works in on-premises Exchange Server 2016, not any other previous version! 

Let’s go ahead-

New-MailboxRepairRequest

This cmdlet is especially designed to detect and fix corrupt mailboxes on Exchange 2016. You can run this command against database or a specific mailbox. But if you’re running this command against Exchange database, only the mailbox being repaired is interrupted. All other mailboxes on the database remain the same.

So, in the below scenario I’ve taken a mailbox john@exchange.com

Run the below shell command to detects and repairs all folder views for the mailbox

New-MailboxRepairRequest -Mailbox john@exchange.com -CorruptionType FolderView

Let’s take another mailbox Nixx to understand few other examples for New-MailboxRepairRequest PowerShell-

1. If you only want to detect and report ProvisionedFolder and SearchFolder corruption issues to Nixx mailbox, execute the below script-

New-MailboxRepairRequest -Mailbox Nixx -CorruptionType ProvisionedFolder,SearchFolder –DetectOnly

2. For repairing AggregateCounts on mailbox database MSE-DB12 for all the mailboxes; run command-

New-MailboxRepairRequest -Database MSE-DB12 -CorruptionType AggregateCounts

3. If you’ve found lot of corruption types in Nixx mailbox, you need to run the command to detect and repair all the corruptions type for Nixx mailbox and achieve.

New-MailboxRepairRequest -Mailbox Nixx -CorruptionType ProvisionedFolder,SearchFolder,AggregateCounts,Folderview –Archive

4. Let’s take another example to create a variable that identify Nixx mailbox

$Mailbox = Get-MailboxStatistics Nixx

Now I am using this variable ($mailbox) to identify the values for the Database and StoreMailbox parameters to generate a request to identify and repair all corruption types-

New-MailboxRepairRequest -Database $Mailbox.Database -StoreMailbox $Mailbox.MailboxGuid -CorruptionType ProvisionedFolder,SearchFolder,AggregateCounts,Folderview

So, we’ve seen above few examples of New-MailboxRepairRequest PowerShell. Now you can check what types of cmdlet can be used to detect and fix mailbox corrupts-

  •  Search folder corruptions (SearchFolder) 
  •  Aggregate counts on folders that aren't reflecting correct values (AggregateCounts) 
  •  Views on folders that aren't returning correct contents (FolderView) 
  •  Provisioned folders that are incorrectly pointing into parent folders that aren't provisioned (ProvisionedFolder)

Note: You need to assignpermission before executing these cmdlets, so first check what permission you need to repair a corrupt mailbox.

As Exchange 2016 final release is months away, so this topic is only applicable for administrators who wanna try Exchange Server 2016 Preview.
Good Luck,

No comments:

Post a Comment