Wednesday 6 September 2017

Update site logo on all SharePoint sites in a site collection

Update site logo on all SharePoint sites in a site collection

Hi there - I used the script below to update the site logo on a bunch of SharePoint Site Collections today - hope it proves useful to you

 ## Set up the variables

$spWeb = Get-SPWeb $SiteURL
$logopath = "C:\Scripts\Logo\logo_SPsites.png"

Write-Host("- Uploading and updating site logo") -ForegroundColor Magenta


## Creating instance of Folder
$spFolder = $spWeb.GetFolder("SiteAssets")

## Getting the file on Disk that we want to upload
$file = Get-Item $logopath

## Uploading the file the the Site Assets library

$null = 
$spFolder.Files.Add("SiteAssets/logo_SPsites.png",$file.OpenRead(),$false)
   

## Set the logo on all webs in the site:      

$sitelogo="$siteurl/$spFolder/ERIS_logo_SPsites.png"

$Site=$SiteURL

$Sites=new-object Microsoft.SharePoint.SPSite($Site)

foreach($web in $Sites.Allwebs) {

$web.SiteLogoUrl=$sitelogo

$web.Update()}


$Sites.Dispose()

###########################################################################

That's it!

Monday 4 September 2017

Set-SPEnterpriseSearchTopology: The server was unable to process the request due to an internal error

OK So after moving the search index location when I tried to set the topology I got this cryptic error:


First try a Reboot!

If that doesn't work then try again - this time with more available RAM - if command doesn't fail immediately then most likely it's going to run:

This was basically a low resource error

SharePoint Information Architecture Diagram

Here is the template I use for Information Architecture designs. It's built using Mindjet and I flesh the nodes out with the low level d...