magritton
1/11/2016 - 9:36 PM

PowerShell script to replace all the logos in all the sites in a site collection within a web application.

PowerShell script to replace all the logos in all the sites in a site collection within a web application.

$sitelogo="http://scushp01/SiteAssets/SoundLogo.png"
$Site="http://scushp01/"
$Sites=Get-SPWebApplication $Site|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()}