Forum Discussion
Michael Schau
May 18, 2017Copper Contributor
SiteProperties.NewUrl not working
Has anyone had any luck changing the SiteCollection url in SharePoint Online using CSOM? https://msdn.microsoft.com/en-us/library/office/microsoft.online.sharepoint.tenantadministration.siteprope...
Deleted
May 19, 2017have you read this?
public property Microsoft.Online.SharePoint.TenantAdministration.SiteProperties.NewUrl - The new URL for the site (updating this will trigger a site rename). Notice. This is not yet functional in the production when this blog post was written
https://dev.office.com/blogs/new-sharepoint-csom-version-released-for-Office-365-march-2016
May 19, 2017
Hi Deleted,
I tried this:
$site = Get-PnPTenantSite https://Mytenant.sharepoint.com/sites/testsite
$site.NewUrl = "https://Mytenant.sharepoint.com/sites/testsite2"
$site.Update()
$site.Context.ExecuteQuery()
and then I tried all variations of Urls for the $site.NewUrl = ""