SharePoint Logos: One logo to rule them all.

13 05 2015

I have been racking my brain trying to figure out a way to force all sites in my SharePoint farm to use the same logo. Obviously I should have stapled it to my master page before pushign it out, but as usual I suck.
So i decided to break out the old PowerShell machina and take a crack at it.
I found a bunch of sites that showed how to do this for all SUBSITES in a Site Collection, but not all Site Collections and subsites.
Here is what I came up. Hope it works for you guys.
This code is as is and I don’t take any responsibility for screwing up your farm.

$sitelogo=”SPSITE where your logo resides usually _layouts/site assets/”

$Site=”http://rootsite

$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()}

Happy SharePointing!

KTHANKSBYE
Nando

Advertisements

Actions

Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: