Hi @67969128 ,
Per my test, we are unable to change the url and library name at the same time in sharepoint online
As a workaround, we can change the url by following powershell script:
#Load SharePoint CSOM Assemblies
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll"
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"
#Config Parameters
$SiteURL= "https://crescent.sharepoint.com"
$ListName="Project Documentation"
$NewListURL="ProjectDocs"
#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()
#Keep the List name as is
$List.Title=$ListName
$List.Update()
$Ctx.ExecuteQuery()
Write-host -f Green "List URL has been changed!"
}
Catch {
write-host -f Red "Error changing List URL!" $_.Exception.Message
}
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.