Forum Discussion

Jeyganesh's avatar
Jeyganesh
Copper Contributor
Aug 19, 2019
Solved

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?

3 Replies

    • Jeyganesh's avatar
      Jeyganesh
      Copper Contributor

      Alireza Rahimifarid 

       

      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 Rahimifarid's avatar
        Alireza Rahimifarid
        Steel Contributor

        Jeyganesh 

         

        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.

         

         

         

         

         

         

         

Resources