SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to create a script that creates a page based on a template.

New-SPWeb -url http://site/project/project01 -template OFFILE#1 -name "01"
Import-SPWeb http://site/project/project01 -Path C:\Backup\tamp.bak

Is there a possibility to change the name and description website usign powershell?

The reason I use the exported packages due to the fact that I want to have a library of set right.

share|improve this question

Something similar to the following should do the trick.

$spAssigment = Start-SPAssignment
$web = Get-SPWeb -site http://sitename/sites/site1 -Identity http://site/project/project01 
   -AssignmentCollection $spAssignment
$web.Title = "..........."
Stop-SPAssignment $spAssignment

notice: Start-SPAssignment and Stop-SPAssignment are only an alternative way of disposing the SPWeb istance.


I forgot to change the description of the web in the above sample. Anyway, you could just use Set-SPWeb.

Get-SPWeb -Identity http://site/project/project01 | Set-SPWeb 
    -Title "My new title" -Description "My new description"

See the sample here

share|improve this answer
Change the description works well. But as I want to change the parameter title, gets an error. code Get-SPWeb site/project/project01 | Set-SPWeb -Title "01" ` ` Set-SPWeb : A parameter cannot be found that matches parameter name 'Title'. At line:1 char:65 + Get-SPWeb site/project/project01 | Set-SPWeb -Title <<<< "01" + CategoryInfo : InvalidArgument: (:) [Set-SPWeb], ParameterBindi ngException + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.SharePoint.Powe rShell.SPCmdletSetWeb ` – MichalW Nov 5 '12 at 12:59

This will update the title after the web has been restored:

$web = Get-SPWeb
share|improve this answer

This is a problem in web sites with non-English Culture Settings. The solution is:

$web = get-spweb("");
$web.TitleResource.SetValueForUICulture($web.UICulture, "Margherita");
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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