Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Repair-SPOSite

Repair-SPOSite

microsoft.online.sharepoint.powershell-1.dll, microsoft.online.sharepoint.powershell.dll

Synopsis

Checks and repairs the site collection and its contents.

Syntax

Repair-SPOSite [-Identity] [-Confirm] [-RuleId] [-RunAlways] [-WhatIf] [<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.

For permissions and the most current information about Windows PowerShell for SharePoint Online, see the online documentation at http://go.microsoft.com/fwlink/p/?LinkId=251832 (http://go.microsoft.com/fwlink/p/?LinkId=251832).

Parameters

-Identity <SpoSitePipeBind>

Specifies the SharePoint Online site collection on which to run the repairs.

Aliases

None

Required?

True

Position

1

Default value

Accept pipeline input?

True

Accept wildcard characters?

False

-Confirm <SwitchParameter>

Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters

Aliases

None

Required?

False

Position

Named

Default value

Accept pipeline input?

False

Accept wildcard characters?

False

-RuleId <Guid>

Specifies a health check rule to run.

Aliases

None

Required?

False

Position

Named

Default value

Accept pipeline input?

False

Accept wildcard characters?

False

-RunAlways <SwitchParameter>

Displays a message that explains the effect of the command instead of executing the command.

Aliases

None

Required?

False

Position

Named

Default value

Accept pipeline input?

False

Accept wildcard characters?

False

-WhatIf <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

Aliases

None

Required?

False

Position

Named

Default value

Accept pipeline input?

False

Accept wildcard characters?

False

Input Type

Return Type

Notes

None

Examples

------------EXAMPLE 1---------------

This example runs all the site collection health checks in repair mode on the https://contoso.sharepoint.com/sites/marketing site collection.

C:\PS>Repair-SPOSite https://contoso.sharepoint.com/sites/marketing

------------EXAMPLE 2---------------

This example runs the Missing Galleries Check rule in repair mode on the https://contoso.sharepoint.com/sites/marketing site collection.

C:\PS>Repair-SPOSite https://contoso.sharepoint.com/sites/marketing -RuleID "ee967197-ccbe-4c00-88e4-e6fab81145e1"

Introduction to the SharePoint Online management shell
Set up the SharePoint Online Management Shell Windows PowerShell environment
Test-SPOSite