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
	}
}

4 Comments

  1. Arghh! You beat me to it. Well, in a way anyway. I wrote a Feature Stapler that does the same thing when a user provisions their personal blog. I plan on posting it on my blog dkmbismarck41.wordpress.com and on CodePlex soon. Its nice to have this alternative as well. Thanks for Sharing.

  2. Hi Jeff,

    Is there any way we can restrict blogs for particular group in AD? My company wants the capability that only certain people (VP’s) should be able to do blogging in SP.

Leave a Comment

Return to Top ▲Return to Top ▲