SPO Site rename

Occasional Reader

Hi all,


I am looking for a way to rename a SharePoint site but only the site name (I don't want the URL changed). I have found scripts to rename the site title but not the actual name.


I have tried scripts to rename the connected M365 group, but that only updates the site name under basic info, but does not update the name under site info.


Interestingly if i update the name of thew group manually in the admin center, it updates correctly in SPO (but doesn't update the name under basic info).


These are the properties I am looking to update




I am needing to prefix over a thousand sites so I really need to find a way to do this in PowerShell or even Graph API.

7 Replies




$newTitle="New Title"
Start-SPOSiteRename -Identity $url -NewSiteTitle $newTitle





$SiteURL = "https://contoso.sharepoint.com/coolsite"
#Connect to PnP Online
Connect-PnPOnline -Url $SiteURL -Credentials (Get-Credential)
#sharepoint online powershell change site name
Set-PnPWeb -Title "Coller Site Portal"



Thanks, but I don't want the URL changed. Is there no way to do this without changing the URL?
If I use your second example, all that does is change the title within the site. I am looking to change the name of the site in the admin center


Both commands will just change the name, even in admin. That's mirrored





Your command still wants to create a new URL



If i do that and specify a new URL, it works as described. But i don't want the URL changed






You can just add the existing URL, it should work!

Else use:

Set-SPOSite -Title "New site title"



So it doesn't work as you have described (at least not for me). Maybe I am doing something wrong?


The site before changes:




I set the current and new URL the same but get an error:




Only if i set the URL to be different does it go through:




Then it updates the site name:




Then if i try changing just the title as you have suggested, it still asks me for a new URL and if i specify the current one it fails:




Also changing the title only changes the title within the site (not in the admin center as the display\site name)