Commands › SharePoint Online

Set-SPOSiteScript

SharePoint Online Microsoft.Online.SharePoint.PowerShell Set-*

Updates a previously uploaded site script.

Quick start script

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

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-SPOSiteScript
$before | Format-List

# 3. Make the change
Set-SPOSiteScript -Identity <SPOSiteScriptPipeBind>

# 4. Verify and diff
$after = Get-SPOSiteScript
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax

Set-SPOSiteScript -Identity <SPOSiteScriptPipeBind> [-Title <String>] [-Content <String>]
 [-Description <String>] [-Version <Int32>] [<CommonParameters>]

Parameters (5)

ParameterTypeRequiredWhat it controls
-Content String 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.
-Identity SPOSiteScriptPipeBind yes The id of the site design.
-Title String The display name of the site design.
-Version Int32 A version number of the script.

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