Repair-SPOSite
Checks and repairs the site collection and its contents.
Syntax
Default (Default)
Repair-SPOSite
-Identity <SpoSitePipeBind>
[-RuleId <Guid>]
[-RunAlways]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
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 at least a SharePoint administrator to run the cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the online documentation at Intro to SharePoint Online Management Shell.
Examples
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.
Parameters
-Confirm
Applicable: SharePoint Online
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: | System.Management.Automation.SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | cf |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Identity
Applicable: SharePoint Online
Specifies the SharePoint Online site collection on which to run the repairs.
Parameter properties
Type: | Microsoft.Online.SharePoint.PowerShell.SpoSitePipeBind |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-RuleId
Applicable: SharePoint Online
Specifies a health check rule to run.
For example:
- "ee967197-ccbe-4c00-88e4-e6fab81145e1" for Missing Galeries.
- "befe203b-a8c0-48c2-b5f0-27c10f9e1622" for Conflicting Content Types.
- "a9a6769f-7289-4b9f-ae7f-5db4b997d284" for Missing Parent Content Types.
- "5258ccf5-e7d6-4df7-b8ae-12fcc0513ebd" for Missing Site Templates.
- "99c946f7-5751-417c-89d3-b9c8bb2d1f66" for Unsupported Language Pack References.
- "6da06aab-c539-4e0d-b111-b1da4408859a" for Unsupported MUI References.
Parameter properties
Type: | System.Guid |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-RunAlways
Applicable: SharePoint Online
Displays a message that explains the effect of the command instead of executing the command.
Parameter properties
Type: | System.Management.Automation.SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-WhatIf
Applicable: SharePoint Online
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
Type: | System.Management.Automation.SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | wi |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.