Forum Discussion
Jeyganesh
Aug 19, 2019Copper Contributor
Sitecollection URL swap error
We are going to change the default site collection so that we used the following Powershell script
PS C:\Users\jey> Connect-SPOService
cmdlet Connect-SPOService at command pipeline position 1
Supply values for the following parameters:
Url: https://company-admin.sharepoint.com
PS C:\Users\jey> Invoke-SPOSiteSwap -SourceUrl https://company.sharepoint.com/sites/companyteam -TargetUrl https://company.sharepoint.com -ArchiveUrl https://company.sharepoint.com/sites/Archive
but it shows the following error:
Invoke-SPOSiteSwap : The site https://company.sharepoint.com/sites/companyteam cannot be used with this cmdlet
because it uses template GROUP#0
At line:1 char:1
+ Invoke-SPOSiteSwap -SourceUrl https://company.sharepoint.com/sites/ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Invoke-SPOSiteSwap], ServerException
+ FullyQualifiedErrorId : Microsoft.SharePoint.Client.ServerException,Microsoft.Online.SharePoint.PowerShell.SwapSite
How to solve this issue?
You can't swap the Team Site. This cmdlet is only working for communication sites.
"source site must be either a Team Site (STS#0), a Modern Team Site (STS#3), or a Communication Site (SITEPAGEPUBLISHING#0)."
3 Replies
Sort By
- Alireza RahimifaridSteel Contributor
You can't swap the Team Site. This cmdlet is only working for communication sites.
"source site must be either a Team Site (STS#0), a Modern Team Site (STS#3), or a Communication Site (SITEPAGEPUBLISHING#0)."
- JeyganeshCopper Contributor
Actually, we wrongly created the communication site as a default site collection. we have no data for that site.
So, Is there any way to recreate, redirect or configure the Team site for the default site.
example: If we call the URL https://company.sharepoint.com it should be open the team site.
Please let us know any possibilities.
- Alireza RahimifaridSteel Contributor
Unfortunately, there is no way to do this now.
The idea of having the communication site at the root site level is great, since everyone in the company coming to the root site and see the general information and news about all company.
I would recommend to keep the communication site at the root site level and create a Team Site for each department or Project.