Commands › SharePoint Online
Repair-SPOSite
Checks and repairs the site collection and its contents.
Quick start script
# Repair-SPOSite — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-SPOService -Url https://$org-admin.sharepoint.com
# 2. Run and inspect
Repair-SPOSite -Identity <SpoSitePipeBind> | Format-List
# 3. Export for evidence / drift tracking
Repair-SPOSite | Export-Clixml .\SPOSite-$(Get-Date -Format yyyyMMdd).xml
Syntax
Repair-SPOSite -Identity <SpoSitePipeBind> [-RuleId <Guid>] [-RunAlways] [-WhatIf] [-Confirm]
[<CommonParameters>]
Parameters (5)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.