Search This Blog

Sunday, June 18, 2017

How to change list and document library web URL In sharepoint using powershell

I this post we will see how to change the list and document library url using powershell.

            We have some scenarios like have to change the list name for an existing list, we can change the name of the list on the list settings page, Select List name, description, and navigation option under the General settings.but we couldn't able to change the web url using User Interface,but we can achieve this using below powershell script.

For this we need Microsoft Powershell Management shell, open the PMS using run as administrator privileges and use the below powershell script to change the web URL of the list/document library.

Add-PSSnapin Microsoft.SharePoint.Powershell
#Paste the site or subsite url
#If you are using site collection url using Get-Spsite instead of Get-Spweb
$Web = Get-SPWeb "http://Test:8080/sites/TestSite/SubSite/"
#Mention the name of the to which the web url should change
$List = $Web.Lists["TestList"]
#Paste the new url which we prefer to change 
$List.RootFolder.MoveTo("/sites/TestSite/SubSite/Lists/test") 

No comments:

Post a Comment