Set Site Logo in all Sub Sites under Site Collection using PowerShell in SharePoint 2013

Set Site Logo in all Sub Sites under Site Collection using PowerShell in SharePoint 2013

In this SharePoint customization URL, we will discuss how to apply logo in all subsites under site collection using PowerShell. Recently I came across a requirement where we have a site collection and in that site collection we have around 100 sites were there. And we do not want to change everywhere or even we do not want to put in the master page as static image URL. Read how to change SharePoint 2016 site logo using the browser.

You may read:
PowerShell to get all Sites and Subsites under Site Collection using PowerShell

Change Master Page using PowerShell in SharePoint 2013

Set People Picker field to empty or blank in SharePoint designer workflow

Before running this PowerShell we need to make sure that the logo is there in the same folder where we are referencing.

Once we will run the below PowerShell script then it should work fine.

Add-PSSnapin “Microsoft.SharePoint.PowerShell”

$sitelogo=”/_layouts/15/images/enjoysharepoint_logo.jpg”

$Site=”http://win-pfcp2dgt8di/sites/EnjoySharePoint/”

$Sites=Get-SPSite $Site -Limit All | Get-SPWeb -limit all

$Sites|ForEach-Object { $_.SiteLogoUrl = $sitelogo; $_.Update()}

$Sites.Dispose()

The above script will set the logo for each sites and sub sites under the site collection.

Change Logo at Web Application Level:

Below is the PowerShell command which you can use to set the logo at the web application level.

Add-PSSnapin “Microsoft.SharePoint.PowerShell”

$sitelogo=”/_layouts/15/images/enjoysharepoint_logo.jpg”

$WebApp=”http://win-pfcp2dgt8di/”

$Sites=Get-SPWebApplication $WebApp | Get-SPSite -Limit All | Get-SPWeb -Limit All | Select URL

$Sites|ForEach-Object {

$CurrentSite=$_.URL

$CurrentSiteObject=new-object Microsoft.SharePoint.SPSite($CurrentSite)

foreach($web in $CurrentSiteObject.Allwebs) {

$web.SiteLogoUrl=$sitelogo

$web.Update()}


$CurrentSiteObject.Dispose()}

Set Site Logo in all Sub Sites under Site Collection using PowerShell in SharePoint 2013
Set Site Logo in all Sub Sites under Site Collection using PowerShell in SharePoint 2013

Hope this will be helpful.


You May Also like the Following SharePoint Online Tutorials:

About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

View all posts by Bijay Kumar →