Forum Discussion
hunk0227
Mar 29, 2022Copper Contributor
Why Private channel can't change the url
Hello, I was trying to rename the URL address of the teams site which has several private channels. However, it looks like my changes is not cascaded thru the private channel. (teamsite-private ...
Theo_Vermaak
Sep 27, 2022Copper Contributor
Hi
So I found this handy script and it seemed to work for me.
#Set Parameters
$AdminCenterURL="https://crescent-admin.sharepoint.com"
$SiteURL = "https://crescent.sharepoint.com/sites/suppliers"
$NewSiteURL = "https://crescent.sharepoint.com/sites/vendors"
$NewSiteTitle = "Vendors"
#Connect to SharePoint Online
Connect-SPOService -Url $AdminCenterURL -Credential (Get-Credential)
#Get all site collections
$Sites = Get-SPOSite -Limit All | Select -ExpandProperty URL
If($Sites -notcontains $NewSiteURL)
{
#Rename SharePoint Online site URL using PowerShell
Start-SPOSiteRename -Identity $SiteURL -NewSiteUrl $NewSiteURL -NewSiteTitle $NewSiteTitle -Confirm:$false
}
Else
{
Write-Host "New Site URL '$NewSiteURL' is not available!" -f Yellow
}
When you are done you can rename the private channel in Teams to what ever you need it to be.
So I found this handy script and it seemed to work for me.
#Set Parameters
$AdminCenterURL="https://crescent-admin.sharepoint.com"
$SiteURL = "https://crescent.sharepoint.com/sites/suppliers"
$NewSiteURL = "https://crescent.sharepoint.com/sites/vendors"
$NewSiteTitle = "Vendors"
#Connect to SharePoint Online
Connect-SPOService -Url $AdminCenterURL -Credential (Get-Credential)
#Get all site collections
$Sites = Get-SPOSite -Limit All | Select -ExpandProperty URL
If($Sites -notcontains $NewSiteURL)
{
#Rename SharePoint Online site URL using PowerShell
Start-SPOSiteRename -Identity $SiteURL -NewSiteUrl $NewSiteURL -NewSiteTitle $NewSiteTitle -Confirm:$false
}
Else
{
Write-Host "New Site URL '$NewSiteURL' is not available!" -f Yellow
}
When you are done you can rename the private channel in Teams to what ever you need it to be.
- LexPage23Mar 02, 2023Copper Contributor
Hi Theo_Vermaak - could you provide more information on how you used the Script or where you found it please? E.g. where & how to run it, what permissions are required. Also could I confirm that the script does what the original requestor asked - changing the URL of the private channels within the SharePoint site (not changing the name of the private channels or changing the SharePoint site URL.)
Thank you in advance,Lex
- hunk0227Apr 19, 2023Copper Contributor@lexPages, This still an issue with the Microsoft and has no fix at the moment so let's live with this setup unfortunately. 😞
I guess the one suggested by Theo was to rename the Root site url and does not reflect to the private channel (e.g "sites/vendors-PrivateChannel"). Tried also rename directly the private channel but no avail getting the write locked error.
Start-SPOSiteRename : Error Code: -105,This site address can't be changed.
This site is write locked.