I'm having problems setting the title of a root web in a site collection when creating it in an other language then English. When i run the script under using 1033, it works fine the site title is set to the input. But then I change to 1044 Norwegian I get no error but the title is empty (I have installed the language package). Here is the script (I'm using a custome site definition, but set it to STS#0 in the example same problem):

    Write-Host "******** Create site. ***********" -f Green
    Write-Host "Please enter the URL and the administrator of the site to create" -f Green
    [console]::ForegroundColor = "yellow"
    $newSiteUrl = Read-Host "Please enter the site Url to for the site"
    $siteAdministrator = Read-Host "Please enter the site administrator"
    $webTitle = Read-Host "Please enter the title of the root"

    $site = New-SPSite $newSiteUrl -OwnerAlias $siteAdministrator -Language 1044
    $web = $site.RootWeb 
    $web.Title = $webTitle
    Write-Host "The Installation is complete please visit the site at" $web.URL -f Green

So how can I set the title of a site using an other language then English?

  • Are you using any special characters in the Norwegian title? Jun 9 '11 at 11:05
  • No I@m trying to name it Norge
    – gaotter
    Jun 9 '11 at 12:33

Why do it in 2 steps? The New-SPSite cmdlet takes a webtemplate and a title parameter too?

  • Hi thank you I did not find any parameter called Title. But the -Name parameter worked. The template is a custome one so I have to add i after the web is created. But when using 1033 I do not need to use the -Name parameter the $web.Title works. I will probebly get problems with it if I need to add sub webs.
    – gaotter
    Jun 9 '11 at 12:35
  • -Name is the same as Title Jun 9 '11 at 12:52
  • If the webtemplate is installed, there should be no problem using it. Check Get-SPWebTemplates | Select Name and just paste in the Name value. For Custom Web template that would be something like {guid}#YourTemplate Jun 9 '11 at 12:54
  • @Anders I tryed that but never got it to work. But then I found this blog mkdot.net/blogs/darko/archive/2011/02/17/… and was able to set the template. But why does not SPWeb.Title work?? Lets say I whant to create a sub site, I can't do that using SPSite?
    – gaotter
    Jun 9 '11 at 13:07
  • Just tryed creating a sub site using New-SPWeb and the -Name parameter worked. Seems like the is somthing strage with the $web.Title and languages.
    – gaotter
    Jun 9 '11 at 13:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.