Wednesday 24 September 2014

The following Script for Saving Site as a Template using Powershell:


$Web=Get-SPWeb http://Servername:port/yourSite

$Web.SaveAsTemplate("Template Name","Template Title","Template

Description",1)

Msdn

# Get a reference to the target site

$web = Get-SPWeb http://yoursitename

# Update the property bage value and set it  to the string value "true"

$web.AllProperties["SaveSiteAsTemplateEnabled"] = "true"

# Commit the property change to server

$web.Update()


Please Note that your site should be a publishing Site if not Enable it under Site Options - Set Publishing to true






No comments:

Post a Comment