Repair-SPOSite

检查并修复网站集及其内容。

语法

Default (默认值)

Repair-SPOSite
    -Identity <SpoSitePipeBind>
    [-RuleId <Guid>]
    [-RunAlways]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

说明

cmdlet 对 Repair-SPOSite 网站集及其内容运行一个或多个网站集运行状况检查。 如果发现问题并且这些问题是可解决的,则此 cmdlet 将进行更改。

此 cmdlet 会将运行状况检查规则和结果摘要一起报告。 这些规则可能不支持自动修复。 可以通过运行 cmdlet 来启动没有修复模式的测试 Test-SPOSite

必须至少是 SharePoint 管理员才能运行 cmdlet。

有关适用于 SharePoint Online 的 Windows PowerShell 的权限和最新信息,请参阅在线文档简介 SharePoint Online 命令行管理程序的简介

示例

示例 1

Repair-SPOSite https://contoso.sharepoint.com/sites/marketing

本示例在网站集上以修复模式 https://contoso.sharepoint.com/sites/marketing 运行所有网站集运行状况检查。

示例 2

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

本示例在网站集上以修复模式 https://contoso.sharepoint.com/sites/marketing 运行缺少库检查规则。

参数

-Confirm

适用:SharePoint Online

提示你在运行 cmdlet 之前进行确认。

参数属性

类型:System.Management.Automation.SwitchParameter
默认值:None
支持通配符:False
不显示:False
别名:cf

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Identity

适用:SharePoint Online

指定要对其运行修复的 SharePoint Online 网站集。

参数属性

类型:Microsoft.Online.SharePoint.PowerShell.SpoSitePipeBind
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:True
来自管道的值:True
来自管道的值(按属性名称):False
来自剩余参数的值:False

-RuleId

适用:SharePoint Online

指定要运行的运行状况检查规则。

例如:

  • “ee967197-ccbe-4c00-88e4-e6fab81145e1”,适用于 Missing Galeries。
  • 冲突内容类型的“befe203b-a8c0-48c2-b5f0-27c10f9e1622”。
  • 缺少父内容类型的“a9a6769f-7289-4b9f-ae7f-5db4b997d284”。
  • 缺少网站模板的“5258ccf5-e7d6-4df7-b8ae-12fcc0513ebd”。
  • “99c946f7-5751-417c-89d3-b9c8bb2d1f66”对于不支持的语言包引用。
  • 不受支持的 MUI 引用的“6da06aab-c539-4e0d-b111-b1da4408859a”。

参数属性

类型:System.Guid
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-RunAlways

适用:SharePoint Online

显示一条说明命令作用的消息,而不执行命令。

参数属性

类型:System.Management.Automation.SwitchParameter
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-WhatIf

适用:SharePoint Online

显示在 cmdlet 运行时发生的情况。 此 cmdlet 未运行。

参数属性

类型:System.Management.Automation.SwitchParameter
默认值:None
支持通配符:False
不显示:False
别名:无线

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

CommonParameters

此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters