How To: SharePoint Site Swap

New PowerShell cmdlet that is rolling out to organizations now and is expected to be rolled out globally by the end of October 2019. This cmdlet will allow SharePoint admins to swap the root url of their SharePoint site with a different site. In this how to we are going to swap a site to the root url of SharePoint Online.


  1. Open PowerShell and connect to your tenant
Connect-SPOService -Url

We need to run the Invoke-SPOSiteSwap cmdlet with the below parameters.

  • SourceUrl: Location of the site you want move. (Must exist before)
  • TargetUrl: Location where you want your site to go. (Must exist before)
  • ArchiveUrl: Location where the site currently at the targetUrl will move to. (Must NOT exist before)

2. Run the command!

Invoke-SPOSiteSwap -SourceUrl -TargetUrl -ArchiveUrl

If the command ran successfully the root of your SharePoint site will now be your source site!