Thursday 13 December 2012

Save Site as Template Powershell Command


You can save your site as template even with the publishing feature using the following Powershell command

$Web=Get-SPWeb http://Server/Site
$Web.SaveAsTemplate("Template Name","Template Title","Template Description",1)

In the forth parameter of SaveAsTemplate(), if you want to save the specified site as template along with data use 1, otherwise use 0.
After running above commands, the newly created template will be available in site collection "Solutions" gallery

1 comment: