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 = "http://sharepoint.crescent.com/sites/operations/us/"

#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 FilesCommon FilesMicrosoft SharedWeb Server Extensions15TEMPLATEIMAGES” 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 "http://sharepoint.crescent.com" | 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!

Source link