Hello,

In a SharePoint 2010 to SharePoint 2016 migration project I was recently involved in, I noticed that in the new SharePoint 2016 Portal, the logo URL in all sites was pointing to an invalid URL.

The Problem

The reason for this is that the Logo URL was pointing to a URL in the SharePoint hive (_layouts virtual directory) and the _layouts virtual directory URL has changed from SharePoint 2010 to SharePoint 2016:

  • SharePoint 2010 Layouts root virtual directory URL: /_layouts
  • SharePoint 2016 Layouts root virtual directory URL: /_layouts/15

The Solution

Since the site collection has a lot of subsites and I would like to avoid having to change the logo URL manually one by one, I built a small PowerShell script that will loop all the sub sites in the site collection and change the Logo URL for each one. Here is the script:

$sitelogo = "/_layouts/15/Images/logo.jpg"

$site = "https://intranet"

$sites = new-object Microsoft.SharePoint.SPSite($site)

foreach ($web in $sites.Allwebs) {

$webUrl = $web.Url

"Changing site logo url at $webUrl"

$web.SiteLogoUrl = $sitelogo

$web.Update()

}

$sites.Dispose()

NOTE: This script should also be valid for SharePoint 2013 and SharePoint 2019.

Hope this helps!

Related Articles

If you want to convert your tenant’s root classic site into a modern SharePoint site, click here.

To learn why your business should migrate to SharePoint Online and Office 365, click here and here.

If you are a SharePoint administrator or a SharePoint developer who wants to learn more about how to install a SharePoint 2019 farm in an automated way using PowerShell, I invite you to click here and here.

If you want to learn how to upgrade a SharePoint 2013 farm to SharePoint 2019, click here and here.

If you want to learn all the steps and precautions necessary to successfully keep your SharePoint farm updated and be ready to start your move to the cloud, click here.

If you learn how to greatly speed up your SharePoint farm update process to ensure your SharePoint farm keeps updated and you stay one step closer to start your move to the cloud, click here.

If SharePoint 2019 is still not an option, you can learn more about how to install a SharePoint 2016 farm in an automated way using PowerShell, click here and here.

If you are involved in a SharePoint upgrade and want to learn more about the upgrade process, click here and here.

If you want to know all about SharePoint 2019, the new version of SharePoint Server, click here.

If you are new to SharePoint and Office 365 and want to learn all about it, take a look at these learning resources.

If you are work in a large organization who is using Office 365 or thinking to move to Office 365 and are considering between a single or multiple Office 365 tenants, I invite you to read this article.

If you want to know all about the latest SharePoint and Office 365 announcements from SharePoint Conference 2019, click here and here.

Happy SharePointing!

LEAVE A REPLY

Please enter your comment!
Please enter your name here