SharePoint: Changing the URL of a Site Collection Using Powershell

To my understanding, there is no standard way of changing the URL of the SharePoint Site collection using UI or powershell. So what I normally do to change the URL of a Site Collection is to:

  • Take the back of the site collection, 
  • Delete the site collection 
  • Restore the site collection from the backup to a new URL 

So here are the commands that you need to execute in the SharePoint Management Shell to achieve the above objective:

Backup-SPSite -Identity 'http://SiteCollectionURL' -Path 'E:\Backups\SieCollectionBackup.bak' -UseSqlSnapshot
Remove-SPSite -Identity 'http://SiteCollectionURL'
Restore-SPSite -Identity 'http://SiteCollection_NewURL' -Path 'E:\Backups\SieCollectionBackup.bak'

Comments

Popular posts from this blog

SPFx: Develop using SharePoint Framework without Installing all the dependecies.

SharePoint Online: Elevated Permissions....with love

Powershell: Filling up an Existing Excel Sheet with data from SQL Server