# URL to your MySite web application$MySiteWebUrl = "https://mysite.collaboration-2-go.net" # where to find users in the AD$searchbase="DC=collaboration-2-go,DC=net" # required if server domain and user domain are different$dc="my_domain_controller" # required if server language is English and# MySite language is different$culture = "de-DE"$webapp = Get-SPWebApplication -identity $MySiteWebUrl[System.Threading.Thread]::CurrentThread.CurrentUICulture = $culture foreach ($site in $webapp.Sites){ # Get Active Directory Information $login = $site.Owner.LoginName if ($login.contains("\")) { $login = $login.substring($login.indexof("\") + 1) } $ldapfilter = "(SamAccountName=" + $login + ")" $aduser = Get-ADUser -LDAPFilter $ldapfilter -SearchBase $searchbase -Server $dc $displayName = $aduser.GivenName + " " + $aduser.Surname if ($displayName -eq " ") { $displayName = $site.owner.DisplayName } if ($site.RootWeb.WebTemplate -eq "SPSPERS") # ignore MySite host { # more sophisticated approach is possible but # I'm not sure about the blog URL foreach ($web in $site.AllWebs) { if (($web.WebTemplate -eq "BLOG") -and ($web.Title -eq "Blog")) { $title = "Blog von " + $displayName $web.Title = $title $web.Update() } $web.Dispose() } } $site.Dispose()}