Sometimes you want to change the url name of a list in SharePoint Online. For example, if your list name is “Order”, the site relative url to the list is “/order”, and you want to change the name to “Orders”, only the list name can be changed in the SharePoint GUI. The URL name stays the same.
There are different ways of solving the problem, but in this example I will use the PnP PowerShell commands to change the url name.
# Connect to a SharePoint site using PnP Powershell Connect-PnPOnline -Url https://[your-tenant].sharepoint.com/sites/[your-site] # Fetch the list by it's GUID (can be found from the url when navigating to list settings) $list = Get-PnPList -Identity "[GUID of the list you want to move]" # Rename the list relative url to the url $rootFolder.MoveTo("[your new list url]") # Invoke the query (same as context.ExecuteQuery in regular CSOM) Invoke-PnPQuery