SharePoint 2010 - Change SiteCollection URL
Solution 1
Yes that is correct. My script to move sites looks something like this:
stsadm -o backup -url "http://domain/sandpit/site" -filename "c:\site.dat"
#delete old site collection
#run gradual site delete job
stsadm -o restore -url "http://domain/sites/site" -filename "c:\site.dat"
Solution 2
You can not really change the URL of the site collection easily as Sharepoint is heavily intertwined with the IIS in special ways ;-)
There are two possible ways to change the URL:
- Extend the web application (as shown in this SO post) to another URL [quick & dirty]
- Recreate the site collection by first exporting it and restoring it (
stsadm -o backup
andstsadm -o restore
) [the "real" method]
There is a nice writeup for Sharepoint 2007 here, though it still holds valid for Sharepoint 2010.
PS: As you asked about Powershell, you can use Backup-SPSite
(MSDN) and Restore-SPSite
(MSDN) to do the same things you can do with stsadm (which is deprecated)
LaPhi
Hello my name is Lars, I´m a Computer Science student and I work in the IT industry. My focus is PowerShell, SharePoint, Office 365, SQL, Security.
Updated on March 05, 2020Comments
-
LaPhi about 4 years
Is there a easy way (like a PowerShell Command) to change the URL from a SiteCollection?
Or is the only way to export SiteCollection -> delete SiteCollection (Because the GUIDs)-> import SiteCollection?