Thursday, 22 March 2018

Change site collection URL in SharePoint 2013

I created this very nice Marketing site collection, using the url: http://sharepoint/sites/marketing. Now I would like to change this to http://sharepoint/sites/sales. Just use the following 2 lines of PowerShell code and you are done!

PowerShell Script

$site = Get-SPSite http://sharepoint/sites/marketing
$site.Rename("http://sharepoint/sites/sales")