Microsoft cloud engineer - SharePoint, Office 365, Azure, DotNet, Angular, JavaScript.
Microsoft cloud engineer - SharePoint, Office 365, Azure, DotNet, Angular, JavaScript.

Rename MySite “Blog” for findability

SharePoint names the blog created in a personal site “Blog.”  At scale this is confusing because everyone’s blog has exactly the same title (“Blog”).

The below PowerShell will rename to “{FirstName LastName} – Blog” for a more user friendly experience across search results, follow site recommendations, and site directory.

Cheers! 

shades_smile
#get all personal site blogs
$webs = Get-SPSite -Limit All |? {$_.RootWeb.WebTemplate -eq "SPSPERS"} | Get-SPWeb -Filter {$_.Template -eq "BLOG"} -Limit All

foreach ($w in $webs) {
	#progress display
	$w.Url
	
	#filter
	if ($w.Title -eq "Blog") {
		#AD lookup
		$splits = $w.Site.Url.Split("/")
		$login = $splits[$splits.length - 1]
		$user = Get-ADUser $login
		$name = $user.Name
		$title = "Blog - $name"
		
		#save
		$w.title = $title
		$w.Update()
		$w.Title
	}
}

© Copyright 2016
@ SPJeff

Return to Top ▲Return to Top ▲