SharePoint root site

Copper Contributor

Hi everyone.

I've recently had the need to redesign and restructure my company sharepoint site. I've made a new homepage (communication site) and did everything I wanted to do with it. I then disassociated it as a hub site and tried replacing the current root site. I select the current root > replace root site > enter the new url (I get the green text saying that the url can be used) and then click save. The arrow icon then spins for a few seconds with "Replacing root site" before giving an error "Couldn't replace root site" and try again in 10 mins (I've tried this lots of times now!). 

 

I then tried the invoke-spositeswap cmdlet but was hit with this error;

Invoke-SPOSiteSwap : The new site name is too long using URL https://xxxxxxxxxx.sharepoint.com/sites/archive. The path for all files and folders in the site cannot exceed
400 characters
At line:1 char:1
+ Invoke-SPOSiteSwap
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Invoke-SPOSiteSwap], ServerException
+ FullyQualifiedErrorId : Microsoft.SharePoint.Client.ServerException,Microsoft.Online.SharePoint.PowerShell.SwapSite

 

I can imagine that there are some file extensions that are really long but we have thousands of files and folders. I don't know what to do!

 

I'm at a loss. I've gone over my go live deadline and stuck with users still being directed to our old site.

 

Any advice?

 

Thanks, Dave

1 Reply

@DangerousDave I think an easy option is to export the archive library to Excel. The export option is available in your library. Optional you can create a temp. view to enable the option show all items without folders. In the export you find the filename and file path. If you combine your full site url with the path and filename you can count the characters. So you know which items exceeds the 400 characters limit. With the information it's easier to modify / move these files. For the case you have to verify that the view returns all items. An additional option is always PowerShell.