Commands › SharePoint Online
Invoke-SPOSiteSwap
Invokes a job to swap the location of a site with another site while archiving the original site.
Quick start script
# Invoke-SPOSiteSwap — 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
Invoke-SPOSiteSwap -ArchiveUrl <String> -SourceUrl <String> | Format-List
# 3. Export for evidence / drift tracking
Invoke-SPOSiteSwap | Export-Clixml .\SPOSiteSwap-$(Get-Date -Format yyyyMMdd).xml
Syntax
Invoke-SPOSiteSwap [-SourceUrl] <String> [[-TargetUrl] <String>] [-ArchiveUrl] <String> [-DisableRedirection]
[-Force] [-NoWait] [<CommonParameters>]
Parameters (6)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.