Repair-SPOSite
Published: July 16, 2012
Applies to: Office 365 | SharePoint Online
Checks and repairs the site collection and its contents.
Repair-SPOSite [-Identity] <SPOSitePipeBind> [-Confirm [<SwitchParameter>]] [-RuleId <Guid>] [-RunAlways <SwitchParameter>] [-WhatIf [<SwitchParameter>]]
Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| Identity | Required | Microsoft.SharePoint.Online.PowerShell.SPOSitePipeBind | Specifies the SharePoint Online site collection on which to run the repairs. |
| Confirm | Optional | System.Management.Automation.SwitchParameter | Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters |
| RuleId | Optional | Guid | Specifies a health check rule to run. |
| RunAlways | Optional | System.Management.Automation.SwitchParameter | Displays a message that explains the effect of the command instead of executing the command. |
| WhatIf | Optional | System.Management.Automation.SwitchParameter | Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command: get-help about_commonparameters |
Detailed Description
The Repair-SPOSite cmdlet runs one or all site collection health checks on the site collection and its contents. This cmdlet will make changes if issues are found and automatically repairable.
The cmdlet reports the health check rules with a summary of the results. The rules might not support automatic repair. Tests without repair mode can be initiated by running the Test-SPOSite cmdlet.
You must be a SharePoint Online global administrator to run the cmdlet.
Input Types
Return Types
------------EXAMPLE 1---------------
Repair-SPOSite https://contoso.sharepoint.com/sites/marketing
This example runs all the site collection health checks in repair mode on the https://contoso.sharepoint.com/sites/marketing site collection.
------------EXAMPLE 2---------------
Repair-SPOSite https://contoso.sharepoint.com/sites/marketing -RuleID "ee967197-ccbe-4c00-88e4-e6fab81145e1"
This example runs the Missing Galleries Check rule in repair mode on the https://contoso.sharepoint.com/sites/marketing site collection.
Change History
| Date | Description |
|---|---|
| July 16, 2012 | Initial publication |
