Hi @Technician123 ,
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
}
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.