Test-SPOSite

測試 SharePoint Online 網站集合。

語法

Default (預設值)

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

Description

Cmdlet 會 Test-SPOSite 針對網站集合及其內容執行一或所有網站集合健康情況檢查。 測試的目的是不進行任何變更,除非在修復模式中,可以透過執行 Repair-SPOSite cmdlet 來啟動。 此 Cmdlet 會報告規則以及結果摘要。

您必須至少是 SharePoint 系統管理員才能執行 Cmdlet。

如需有關適用於 SharePoint Online 的 Windows PowerShell 權限和最新資訊,請參閱位於 SharePoint Online Management Shell 簡介的線上文件。

範例

範例 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。