Save Site as Template in Sharepoint 2013 using PowerShell

How to save site as template in SharePoint 2013?
The most easiest way to create a standard template for your SharePoint sites is to Create a site,  Add-remove content, list and libraries to it and save site as a template from Site Settings >> Save Site as template. - Shortcut URL: "/_layouts/savetmpl.aspx"
Save Site as Template in Sharepoint 2013 using PowerShell

Save Site as Template in SharePoint 2013 using PowerShell
You can save your site as template even with the publishing feature using the following PowerShell command
$WebURL = "http://your-site-collection-URL"

#Get the Web Object
$Web= Get-SPWeb $WebURL

#Variables for Save site as template settings
$TemplateName ="PMO Site Template"
$TemplateTitle ="PMO Project Site Template" 
$TemplateDescription ="Site template for PMO project management portal"

#Option to Save with content
$SaveWithContent= 1  #0 otherwise

#Save site as template programmatically with PowerShell
Saved template will be available under site collection "Solutions" gallery. Once saved, you can import this WSP (it was .stp in SharePoint 2007 days!) file from the solution gallery into Visual Studio and customize it further. You can also upload the WSP file to other site collections to add this new site template.

No comments:

Please Login and comment to get your questions answered!

Powered by Blogger.