Forum Discussion
daivea
Jun 27, 2024Copper Contributor
SPO Site rename
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.
Powershell:
$url="https://<tenant>.sharepoint.com/sites/samplesite" $newTitle="New Title" Start-SPOSiteRename -Identity $url -NewSiteTitle $newTitle
PnP:
$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"