Change the root site collection of your tenant to modern SharePoint
Back in February this year I posted an article explaining how you can transform and modify a classic root site collection on SharePoint Online to look like a modern communication site.
This is by far the most viewed article on my blog this year with more that 10k visits, meaning that there are a lot of SharePoint admins trying hard to get a consistent modern experience on their intranets.
With the latest version of the SharePoint Online Management Shell a new command was introduced to swap SharePoint sites and it can be used to define a modern site collection as the root site of your tenat.
How does it work
In order to accomplish the steps below you need to get SharePoint Online Management Shell version 16.0.8812.1200 or later.
- Open the PowerShell console and type the authentication command. Please note that you need to use the Admin url.
Connect-SPOService -Url https://contoso-admin.sharepoint.com
- Provide the authentication credentials
- Type the command below passing the parameters
Invoke-SPOSiteSwap -SourceUrl https://contoso.sharepoint.com/sites/newIntranet -TargetUrl https://contoso.sharepoint.com -ArchiveUrl https://contoso.sharepoint.com/sites/oldIntranet
SourceUrl – URL of the source site. The site at this location must exist before performing the swap.
TargetUrl – URL of the target site that the source site will be swapped to. The site at this location must exist before performing the swap.
ArchiveUrl – URL that the target site will be archived to. There should be no existing site, including a deleted site in the Recycle Bin, at this location before performing the swap.
With a simple PowerShell command, you will be able to finally provide a true modern experience to your users on SharePoint Online.
This can be used on other scenarios to rename site collections, you no longer need to keep old department names on the site collections. Keep your intranet organized and with URLs that mean something to the users.