Commands › SharePoint Online

Remove-SPOSiteScript

SharePoint Online Microsoft.Online.SharePoint.PowerShell Remove-*

Removes a site script.

Quick start script

# Remove-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
Remove-SPOSiteScript -Identity <SPOSiteScriptPipeBind>

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

Syntax

Remove-SPOSiteScript [-Identity] <SPOSiteScriptPipeBind> [<CommonParameters>]

Parameters (1)

ParameterTypeRequiredWhat it controls
-Identity SPOSiteScriptPipeBind yes The ID of the site script to remove.

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