Replace a Classic Root Site M365

Replacing root site with a new modern site is a two-step process. Make sure you have the latest PowerShell module for SharePoint Online installed (16.0.8812.1200 or later). To get the installed PowerShell module version, use the following:

1(Get-Module-NameMicrosoft.Online.SharePoint.PowerShell).Version.ToString()

Step 1: 

Create a new modern SharePoint site collection using a communication site template and customize it as per your requirements, such as adding necessary resources like document libraries, navigation, etc. You can also use any existing modern communication site in your SharePoint environment. This will be your new top-level site.

Step 2:

Execute the Invoke-SiteSwap cmdlet to start replacing the old site with the new One
Here is the SharePoint Online PowerShell script to swap a new SharePoint site in place of the old site collection. As its name suggests, the Invoke-SPOSiteSwap PowerShell command swaps a site collection with another one, while taking a backup of the source site collection. Also, it creates a site redirect from the source location to the target location (unless you disable it with -DisableRedirection switch!).

The Root site swap process may take a moment to complete. Please note that the source and target sites can’t connect to an Office 365 group. They also can’t be hub sites or associated with a hub (Remove the Hub site association before swapping and re-associate). Typically, it takes a few minutes to complete. All subsites contained with the source and target sites will be swapped, and this cmdlet takes the following parameters:

  • SourceURL – New site collection that you want to swap with your old site. The source site must be an existing classic team site (STS#0), Modern Team Site (STS#3), or Communication Site (SITEPAGEPUBLISHING#0)
  • TargetURL – This is your existing Classic site in the Office 365 tenant.
  • ArchiveURL – Archival URL is the location to archive an existing site. It must not currently exist (even as a deleted site in Recycle bin). This allows you to roll back your changes if required.

The Invoke-SPOSiteSwap cmdlet doesn’t convert your classic site collection into a modern one. Instead, it replaces the current site collection with another existing one! Moreover, any static link must be fixed manually.

Summary

In conclusion, replacing the classic root site collection with a modern site in SharePoint Online can be accomplished using either SharePoint Admin Center or PowerShell. This process can be useful when you’re looking to modernize your SharePoint Online environment and take advantage of the new features and functionalities available on modern sites. Overall, replacing the classic root site collection with a modern communication site that offers a modern user interface that is more visually appealing, Mobile-Friendly, advanced web parts, and intuitive, responsive user experience helps to increase productivity and collaboration.

Posted in public and tagged , , .

Leave a Reply