Commands › Exchange Online

New-PublicFolderDatabaseRepairRequest

Exchange Online ExchangeOnlineManagement New-*

Detect and fix replication issues in the public folder database.

Quick start script

# New-PublicFolderDatabaseRepairRequest — 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-PublicFolderDatabaseRepairRequest
$before | Format-List

# 3. Make the change (dry run first)
New-PublicFolderDatabaseRepairRequest -Database <DatabaseIdParameter> -CorruptionType <PublicFolderDatabaseCorruptionType[]> -WhatIf
New-PublicFolderDatabaseRepairRequest -Database <DatabaseIdParameter> -CorruptionType <PublicFolderDatabaseCorruptionType[]>

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

Syntax

New-PublicFolderDatabaseRepairRequest [-Database] <DatabaseIdParameter> -CorruptionType <PublicFolderDatabaseCorruptionType[]>
 [-Confirm]
 [-DetectOnly]
 [-DomainController <Fqdn>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (6)

ParameterTypeRequiredWhat it controls
-Database DatabaseIdParameter yes The Database parameter specifies the public folder database that you want to repair. You can use any value that uniquely identifies the database. For example:
-CorruptionType PublicFolderDatabaseCorruptionType[] yes The CorruptionType parameter specifies the type of corruption that you want to detect and repair. The only available value is ReplState.
-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 this command 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...
-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.