Articles about European Sharepoint Hosting Service
SharePoint Hosting – Change SharePoint Online List Or Library Internal Name
Recently we have provided a build and guideline document to our client and by mistake they have set up a library with the wrong internal name. In the beginning it worked well but as the additional functionality was added, it broke. As the users have started working on that, we needed to fix the internal name anyway.
Our library internal name is “TrainingDocuments” and display name is “Training Documents”. While Client has set up “Training Documents”
Solution
Initially we thought it might be not possible. But then we found 2 ways to do it,
Approach 1 – Using SharePoint Designer 2013
Follow the below steps to fix this using SharePoint Designer 2013,
- In SharePoint Designer, Open your site.
- Navigate to All Files navigation node (not List and Libraries node),
Note
you will need “Site Collection Administrator” permission in the site collection to see “All Files” option. - Find your list there
- Right-click list
- Rename.
Approach 2 – Using PNP PowerShell
In case you are not able to connect the site in the SharePoint designer or you do not have it installed in your machine, you can do this using PNP PowerShell as well.
PowerShell to change Library Name,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
#Set Parameters $<span class="attribute">SiteURL</span> = <span class="attribute-value">"Site URL"</span> $<span class="attribute">ListName</span> = <span class="attribute-value">"Library Internal Name"</span> $<span class="attribute">NewListURL</span> = <span class="attribute-value">"New Library Name"</span> #Connect to PNP Online Connect-PnPOnline -Url $SiteURL -Credentials (Get-Credential) #this will change URL #Get the List $<span class="attribute">List</span>= <span class="attribute-value">Get</span>-PnPList -Identity $ListName -Includes RootFolder #sharepoint online powershell change list url $List.Rootfolder.MoveTo($NewListURL) Invoke-PnPQuery #this will change library title Set-PnPList -Identity $ListName -Title $NewListURL |
PowerShell to change List Name
For list, we don’t need to execute command for root folder changes. So, the updated powershell is as follows:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
#Set Parameters $<span class="attribute">SiteURL</span> = <span class="attribute-value">"Site URL"</span> $<span class="attribute">ListName</span> = <span class="attribute-value">"Library Internal Name"</span> $<span class="attribute">NewListURL</span> = <span class="attribute-value">"New Library Name"</span> #Connect to PNP Online Connect-PnPOnline -Url $SiteURL -Credentials (Get-Credential) Set-PnPList -Identity $ListName -Title $NewListURL |
Print article | This entry was posted by Peter on December 17, 2020 at 4:48 am, and is filed under Other Related Post. Follow any responses to this post through RSS 2.0. Both comments and pings are currently closed. |