Commands › Exchange Online

New-MailboxRepairRequest

Exchange Online ExchangeOnlineManagement New-*

Detect and fix mailbox corruption issues.

Quick start script

# New-MailboxRepairRequest — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-MailboxRepairRequest
$before | Format-List

# 3. Make the change (dry run first)
New-MailboxRepairRequest -Database <DatabaseIdParameter> -Mailbox <MailboxIdParameter> -CorruptionType <MailboxStoreCorruptionType[]> -WhatIf
New-MailboxRepairRequest -Database <DatabaseIdParameter> -Mailbox <MailboxIdParameter> -CorruptionType <MailboxStoreCorruptionType[]>

# 4. Verify and diff
$after = Get-MailboxRepairRequest
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax — 2 parameter sets

Database

New-MailboxRepairRequest [-Database] <DatabaseIdParameter> -CorruptionType <MailboxStoreCorruptionType[]> [[-StoreMailbox] <StoreMailboxIdParameter>]
 [-Confirm]
 [-DetectOnly]
 [-DomainController <Fqdn>]
 [-Force]
 [-WhatIf]
 [<CommonParameters>]

Mailbox

New-MailboxRepairRequest [-Mailbox] <MailboxIdParameter> -CorruptionType <MailboxStoreCorruptionType[]>
 [-Archive]
 [-Confirm]
 [-DetectOnly]
 [-DomainController <Fqdn>]
 [-Force]
 [-WhatIf]
 [<CommonParameters>]

Parameters (10)

ParameterTypeRequiredWhat it controls
-Database DatabaseIdParameter yes The Database parameter repairs or detects corruption in all mailboxes in the specified database. You can use any value that uniquely identifies the database. For example:
-Mailbox MailboxIdParameter yes The Mailbox parameter specifies the mailbox that you want to repair or detect corruption in. You can use any value that uniquely identifies the mailbox. For example:
-StoreMailbox StoreMailboxIdParameter The StoreMailbox parameter specifies the mailbox GUID of the mailbox you want to repair or detect corruption in. Use this parameter with the Database parameter.
-CorruptionType MailboxStoreCorruptionType[] yes The CorruptionType parameter specifies the type of corruption that you want to detect and repair. You can use the following values:
-Archive SwitchParameter The Archive switch specifies whether to repair or detect corruption the archive mailbox that's associated with the specified mailbox. You don't need to specify a value with this switch.
-Confirm SwitchParameter The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on whether the cmdlet requires confirmation before proceeding.
-DetectOnly SwitchParameter The DetectOnly switch specifies that you want to report errors, but not fix them. You don't need to specify a value with this switch.
-DomainController Fqdn The DomainController parameter specifies the domain controller that's used by this cmdlet to read data from or write data to Active Directory. You identify the domain controller by its fully qualified domain name...
-Force SwitchParameter The Force switch hides warning or confirmation messages. You don't need to specify a value with this switch.
-WhatIf SwitchParameter The WhatIf switch shows what the command does without making any changes. You don't need to specify a value with this switch.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.