SharePoint Logo Deployment WebApp Wide Powershell

Throughout the SharePoint migrations I have performed, a common ask by a client for their new environment is typically some branding. Extensive branding which includes JS and CSS markups on a page typically require an extended amount of work and effort, but deploying a simple logo and color scheme to a Web Application is a pretty straightforward process, especially with PowerShell.

To deploy a logo, first get your logo prepared for deployment. Ideally, a SharePoint site logo is no more than 60px vertically. Now that the logo is ready, you’ll need to place it in a location that can be accessed globally by all Site Collections. What I prefer to do, at least in a single Web Front End deployment, is to throw the PNG in the 15 hive for the installation directory. You can find this at C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\<Branding> where <Branding> is a newly created folder that contains specific style objects like this. In a multi-WFE farm, put this logo in this location on all WFEs.

Now to deploy the logo, use the below PowerShell script:

The above will get the Web Application specified by $WebApp, list out all Site Collections, and then with each, will enumerate through all subsites and set the logo attribute for each site to the specific image file.