Commands › SharePoint Online

Set-SPOSiteScriptPackage

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

Updates a previously uploaded site script package. The package file must be a zip archive containing all the files necessary for the site script. A file called "manifest.json" with script actions must be present in this zip file.

Quick start script

# Set-SPOSiteScriptPackage — 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-SPOSiteScriptPackage
$before | Format-List

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

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

Syntax

Set-SPOSiteScriptPackage -Identity <SPOSiteScriptPipeBind> [-Title <String>] [-ContentPath <String>]
 [-Description <String>] [-Version <Int32>] [<CommonParameters>]

Parameters (5)

ParameterTypeRequiredWhat it controls
-ContentPath String The absolute path to a zip archive file containing the content of the new site script package.
-Description String A description of the site script.
-Identity SPOSiteScriptPipeBind yes The ID of the site script.
-Title String The display name of the site script.
-Version Int32 The version number of the site script.

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