Commands › SharePoint Online

Add-SPOSiteScript

SharePoint Online Microsoft.Online.SharePoint.PowerShell Add-*

Uploads a new site script for use either directly or in a site design.

Quick start script

# Add-SPOSiteScript — 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
Add-SPOSiteScript -Content <String> -Title <String> | Format-List

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

Syntax

Add-SPOSiteScript -Title <String> -Content <String> [-Description <String>] [<CommonParameters>]

Parameters (3)

ParameterTypeRequiredWhat it controls
-Content String yes The JSON value that describes the script. For more information, see the [JSON reference](/sharepoint/dev/declarative-customization/site-design-json-schema).
-Description String A description of the script.
-Title String yes The display name of the site design.

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