Sep 26 2022 07:41 AM
Hi, I have a powershell script related to SharePoint 2013 server. Can this be converted to work on online, as the site is community site template which was available in SharePoint 2013 and its also available in SharePoint online. we are having an issue with community SharePoint site online and need to use the same script which fixed the issue on SP 2013 community site. Below is the script
$web = Get-SPWeb <Affected web URL here>
$categorieslist = $web.Lists["Categories"]
$categorieslist.Title = "Categories_old"
$categorieslist.RootFolder.MoveTo($web.Url + "/lists/categories_old")
$categorieslist.Update()
Write-Host "Categories list issue fixed..."
Disable-SPFeature -Identity CommunitySite -Url $web.Url
Enable-SPFeature -Identity CommunitySite -Url $web.Url
Write-Host "Community Site Feature reactivated..."
Sep 26 2022 08:08 AM
SolutionSep 26 2022 08:18 AM - edited Sep 26 2022 09:15 AM
hi @AndresGorzelany
This code did some stuff. Renamed the old categories and created the new Categories but my URL didn't update to new categories, any advise for this ?
I reset Site Features manually from site settings
Connect-PnPOnline -Url https://[your-tenant].sharepoint.com/sites/[your-site]
$categorieslist = Get-PnPList -Identity "[GUID of the list you want to move]"
$categorieslist.Title = "Categories_old"
$categorieslist.RootFolder.MoveTo("https://[your-tenant].sharepoint.com/sites/[your-site]" + "/lists/categories_old")
$categorieslist.Update()
Invoke-PnPQuery
Write-Host "Categories list issue fixed..."
Sep 27 2022 04:04 AM
Sep 26 2022 08:08 AM
Solution