Saturday, September 27, 2014

Update the Site Logo using PowerShell script

The following script updates the site logo url to the new url.

Script:
$sites=(get-spsite http://sharepointsite).AllWebs
$sites| foreach {
$var=$_.SiteLogoUrl;
if($var.Contains("http://testsite/"))
{
$var1=$var.Replace("http://testsite/", "http://newsite/");
$_.SiteLogoUrl = $var1;
$_.Update()
}
}

No comments:

Post a Comment