SharePoint 2010: How to change the Site Logo in every Sites in a Site Collection

To change the logo setting across a site collection you’ll have to do it individually for each site in the site collection. So if you decide to do it manually you'll have a lot of tedious work ahead of you updating each and every site.

Using PowerShell we can write a few lines of code and get this problem resolved in a matter of minutes.

With the AllWebs property we have access to all the subsites under a site collection, including top level sites and children.

So here's the code, you can input it directly into the PowerShell console.

Add-PSSnapin Microsoft.SharePoint.PowerShell
$siteurl = "https://test.sp2010.dev"
$sitelogo = "/Style Library/My Project/Images/logo.png"
$site = new-object Microsoft.SharePoint.SPSite($siteurl)
foreach($web in $site.AllWebs) {
 $web.SiteLogoUrl = $sitelogo
 $web.Update()
 $web.Dispose()
}
$site.Dispose()
Dércia Silva
Posted by Dércia Silva on October 16, 2013

Related articles