Test-PnPSite
SYNOPSIS
Required Permissions
- SharePoint: Access to the SharePoint Tenant Administration site
Checks the site collection and its contents.
SYNTAX
Test-PnPSite -Identity <SitePipeBind> [-RuleId <Guid>] [-Connection <PnPConnection>]
DESCRIPTION
The Test-PnPSite cmdlet runs one or all site collection health checks on the site collection and its contents. Tests are intended not to make any changes except in repair mode, which can be initiated by running the Repair-PnPSite cmdlet. This cmdlet reports the rules together with a summary of the results.
EXAMPLES
EXAMPLE 1
Test-PnPSite -Identity "https://contoso.sharepoint.com/sites/marketing"
This example runs all the site collection health checks on the https://contoso.sharepoint.com/sites/marketing site collection.
EXAMPLE 2
Test-PnPSite -Identity "https://contoso.sharepoint.com/sites/marketing" -RuleID "ee967197-ccbe-4c00-88e4-e6fab81145e1"
This example runs the Missing Galleries Check rule in test mode on the https://contoso.sharepoint.com/sites/marketing site collection.
PARAMETERS
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: PnPConnection
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Identity
Specifies the SharePoint Online site collection on which to run the repairs.
Type: SitePipeBind
Parameter Sets: (All)
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-RuleId
Specifies a health check rule to run.
For example:
"ee967197-ccbe-4c00-88e4-e6fab81145e1"
for Missing Galleries."befe203b-a8c0-48c2-b5f0-27c10f9e1622"
for Conflicting Content Types."a9a6769f-7289-4b9f-ae7f-5db4b997d284"
for Missing Parent Content Types."5258ccf5-e7d6-4df7-b8ae-12fcc0513ebd"
for Missing Site Templates."99c946f7-5751-417c-89d3-b9c8bb2d1f66"
for Unsupported Language Pack References."6da06aab-c539-4e0d-b111-b1da4408859a"
for Unsupported MUI References.
Type: Guid
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False