Commands › SharePoint Online

Get-SPOSiteScriptFromWeb

SharePoint Online Microsoft.Online.SharePoint.PowerShell Get-*

Creates site script syntax from an existing SharePoint site.

Quick start script

# Get-SPOSiteScriptFromWeb — 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
Get-SPOSiteScriptFromWeb -WebUrl <String> | Format-List

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

Syntax

Get-SPOSiteScriptFromWeb [-WebUrl] <String> [-IncludedLists <String[]>] [-IncludeBranding] [-IncludeTheme]
 [-IncludeRegionalSettings] [-IncludeSiteExternalSharingCapability] [-IncludeLinksToExportedItems]
 [<CommonParameters>]

Parameters (7)

ParameterTypeRequiredWhat it controls
-IncludeBranding SwitchParameter A switch that if provided, extracts the configuration of the site's branding.
-IncludedLists String[] An array of one or more lists. Each is identified by the list url.
-IncludeLinksToExportedItems SwitchParameter A switch that if provided, extracts navigation links. In order to export navigation links pointing to lists, the list needs to be included in the request as well.
-IncludeRegionalSettings SwitchParameter A switch that if provided, extracts the site's regional settings.
-IncludeSiteExternalSharingCapability SwitchParameter A switch that if provided, extracts the site's external sharing capability.
-IncludeTheme SwitchParameter A switch that if provided, extracts the site's custom theme by using the themeJson property.
-WebUrl String yes The url that starts with HTTPS of the site to retrieve the site script.

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