Test-SPOSite

测试 SharePoint Online 网站集。

语法

Default (默认值)

Test-SPOSite
    -Identity <SpoSitePipeBind>
    [-RuleId <Guid>]
    [-RunAlways]
    [<CommonParameters>]

说明

Test-SPOSite该 cmdlet 对网站集及其内容运行一项或所有网站集运行状况检查。 除了在修复模式下(可以通过运行 Repair-SPOSite cmdlet 启动)之外,测试不应进行任何更改。 此 cmdlet 会同时报告规则和结果摘要。

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

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

示例

示例 1

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

此示例对网站集运行 https://contoso.sharepoint.com/sites/marketing 所有网站集运行状况检查。

参数

-Identity

适用:SharePoint Online

指定要测试的 SharePoint Online 网站集。

参数属性

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

参数集

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

-RuleId

适用:SharePoint Online

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

参数属性

类型: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

CommonParameters

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