Renaming a SharePoint Site

In our two previous posts, we shared how to rename a SharePoint site collection and how to rename a SharePoint list / document library. Now, we would like to share another one, still related with those two: renaming a SharePoint site. It is not as complex as renaming a site collection, but it requires a little bit more work than renaming a list.

Bear in mind that renaming the top level site in a site collection is considered renaming site collection, so you must use technique we described before in rename a SharePoint site collection. If you insist on using this technique to rename a top level site, you’ll get the following error message: Cannot move the root web of a site collection. What we will do is renaming a sub-site URL.

At the time being, we can’t use SharePoint Designer to rename a site. What we need is SharePoint Management shell, and administrative access in the site collection. As an example, currently we have a sharepoint site http://pena-dev2:7006/fms/fag, and we want to rename it to http://pena-dev2:7006/fms/finance. The following command is what you need to rename it:

Get-SPWeb http://pena-dev2:7006/fms/fag | Set-SPWeb -RelativeUrl finance

Rename SharePoint Web

There are two commandlets in the code snippet above, separated by a pipe. The first commandlet is used to retrieve SharePoint SPWeb object. The result of this first part is then piped as argument of the second part Set-SPWeb.

Note: We tried this method with SharePoint 2013, not tested with other versions of SharePoint.

Source: Renaming a SharePoint Site

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s