SharePoint 2013 Change Site Logo Programmatically with PowerShell

We can change SharePoint 2013 site logo by going to: Site Settings >> “Title, Description, and Logo” from the SharePoint web user interface:

sharepoint powershell change site logo

Now, Lets change logo for all sites in a site collection through PowerShell to save some time.

SharePoint 2013 change site logo programmatically using PowerShell:

Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue

#Web URL to update Logo 
$WebURL = ""

#Get the Web
$Web = Get-SPWeb $WebURL

$web.SiteLogoUrl = "/_layouts/15/images/sharepoint-diary-logo.png"  #can be from any library too: "/sites/operations/images/Corp-Logo.png"

Write-host "Logo updated for :"$WebURL

This script changes logo programmatically for a single site.

You can copy the logo file to your each WFE, so that the logo will be retrieved from file system rather from a SharePoint library. The “Images” virtual folder is mapped with “C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\IMAGES” in the file system.

Make sure your logo file is accessible by everyone. Users must have read access at least! and it should be approved (if content approvals is ON. Checked-in and published too!). Otherwise, your users may end-up continuous authentication prompts without page loading, when accessing SharePoint sites!

Update logo URL using PowerShell for a SharePoint Site collection:

Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue

$SiteURL = "http://Your-Site-Collection-URL"

#Get the site collection
$Site = Get-SPSite $SiteURL

#Iterate through each site in the site collection 
foreach($web in $Site.AllWebs)
    #sharepoint change logo programmatically 
    $web.SiteLogoUrl = "/relative-path-logo-file" 

This script makes the change in logo for all sites in SharePoint 2010 (or SharePoint 2013).

sharepoint powershell change site logo

SharePoint PowerShell Change Site logo for All sites in a Web Application:

Let’s change logo for entire web application in one liner:

#sharepoint 2016/2013 change logo for all sites 

Get-SPWebApplication "" | Get-SPSite -Limit "All" | Get-SPWeb -Limit "All" |  foreach { $_.SiteLogoUrl=""; $_.update(); Write-host "Changing Logo for:"$_.Url;  }

All of these scripts are valid for SharePoint 2010 also!

Salaudeen Rajack

Salaudeen Rajack is a SharePoint Architect with Two decades of SharePoint Experience. He loves sharing his knowledge and experiences with the SharePoint community, through his real-world articles!

3 thoughts on “SharePoint 2013 Change Site Logo Programmatically with PowerShell

  • May 29, 2020 at 7:29 AM

    This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information. Keep it up. Keep blogging. Looking to reading your next post.

  • October 18, 2018 at 9:27 PM

    I have seen a hundred posts on how to change the logo and I can certainly do that without issue. But how do you change the ALT text? I cannot find anything! I have changed all the logos on our sites, but when you hover, it shows the text for the old logo. Company name has changed, so I need it changed there too. HELP

    • October 22, 2018 at 10:09 AM

      By default the site title is used as Alt text for Logos. It appears that, whatever we enter in the “Description Text” field for the Logo is ignored!


Leave a Reply