question

Technician123-3743 avatar image
0 Votes"
Technician123-3743 asked JinweiLi-MSFT commented

Cannot Rename Sharepoint Document Library Address

For some reason I cannot rename sharepoint document library address, but can rename display name:
201195-image.png


office-sharepoint-online
image.png (11.6 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

JinweiLi-MSFT avatar image
0 Votes"
JinweiLi-MSFT answered JinweiLi-MSFT commented

Hi @Technician123-3743 ,

You could use following PowerShell command to change library url.

PowerShell:

 Connect-SPOService -Url https://contoso-admin.sharepoint.com
 #Config Parameters
 $SiteURL= "https://contoso.sharepoint.com/sites/name"
 $ListName="doc111"
 $NewListURL="doc222"
    
 #Setup Credentials to connect
 $Cred = Get-Credential
 $Cred = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.UserName,$Cred.Password)
    
 Try {
 #Setup the context
 $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL)
 $Ctx.Credentials = $Cred
    
 #Get the List
 $List=$Ctx.web.Lists.GetByTitle($ListName)
 $Ctx.Load($List)
    
 #sharepoint online change library url powershell
 $List.Rootfolder.MoveTo($NewListURL)
 $Ctx.ExecuteQuery()
    
 Write-host -f Green "List URL has been changed!"
 }
 Catch {
 write-host -f Red "Error changing List URL!" $_.Exception.Message
 }

201247-image.png


If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



image.png (31.0 KiB)
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @Technician123-3743,
Is there any update on this thread? Comment here if you still need any help.

0 Votes 0 ·

Hello @JinweiLi-MSFT

I did end up filing a ticket with MS support through the Office365 admin panel and they told me that this was not recommended and it would be better to create a new sharepoint site with desired url to then transfer over the data from old undesired sharepoint url location.

Thank You

1 Vote 1 ·
JinweiLi-MSFT avatar image JinweiLi-MSFT Technician123-3743 ·

Hi @Technician123-3743,

Thank you.

0 Votes 0 ·