Commands › SharePoint Online

Test-SPOSite

SharePoint Online Microsoft.Online.SharePoint.PowerShell Test-*

Tests a SharePoint Online site collection.

Quick start script

# Test-SPOSite — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-SPOService -Url https://$org-admin.sharepoint.com

# 2. Run and inspect
Test-SPOSite -Identity <SpoSitePipeBind> | Format-List

# 3. Export for evidence / drift tracking
Test-SPOSite | Export-Clixml .\SPOSite-$(Get-Date -Format yyyyMMdd).xml

Syntax

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

Parameters (3)

ParameterTypeRequiredWhat it controls
-Identity SpoSitePipeBind yes Specifies the SharePoint Online site collection to test.
-RuleId Guid Specifies the health check rule to run.
-RunAlways SwitchParameter Forces a rule to run even if a health check was run.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.