SharePoint Hosting News: Navigation is Broken After Upgrade SharePoint

SharePoint Hosting News: Navigation is Broken After Upgrade SharePoint

When migrating from SharePoint 2007 to SharePoint 2010, it might be possible that your navigation is broken.

Microsoft has published a PowerShell script which is worthwhile to share with you!

$site = Get-SPSite("http://WebApplicationURL")
foreach ($web in $site.AllWebs)
  Write-Output("web:" + $web.ServerRelativeUrl);
  $pageslistid = $web.AllProperties["__PagesListId"]
  if ([String]::IsNullOrEmpty($pageslistid))
    Write-Output($web.ServerRelativeUrl +" doesn't have a pages list id set - skipping");
    $pageslistguid = new-object System.Guid($pageslistid)
    $pageslist = $web.Lists[$pageslistguid]
    $pagesurl = $pageslist.RootFolder.Url
    $pb = $web.Properties;
    $pb.Add("__PagesListName", $pagesurl);
    Write-Output($web.ServerRelativeUrl +" set pages list to " + $pagesurl);

There are two variables to set at the top. One is the URL of the target web application where you want the links fixed (your upgraded/migrated site), and the other is the old host name (base URL without the http/https part) that needs to be searched for.

If you choose to copy and use this script, you do so AT YOUR OWN RISK. I will not be held liable for anything that happens in your environment. As always, I recommend TESTING things like this before you use it in a production environment.

Lastly, this only fixes navigation links in the Quick Launch and top navigation menus. It does not fix links within content such as pages or web parts or in code such as JavaScript code. You’ll either need to fix those manually or write another script to address those things. In my case it wasn’t necessary to automate fixing links to that level, so I didn’t worry about it.

Best SharePoint Hosting Recommendation provides its customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server. offers SharePoint hosting starts from $9.99. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable SharePoint Hosting, we should be your best choice.