You are trying to save a site or a list (with content) as a template in SharePoint 2007/2010, but it gives you this error:
$svcWebService.MaxTemplateDocumentSize = $intTemplateSize
$svcWebService.Update()
"The list is too large to save as a template. The size of a template cannot exceed 10485760 bytes."
OR "The site is too large to save as template. The size of template cannot exceed 10485760 bytes.”
It is pretty easy to increase the size of template in SharePoint. This quick little stsadm command will allow to increase the template size for site and list both. Open the Windows Command Prompt and change the path to “C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN”\ and then type the below stsadm command:
stsadm -o setproperty -pn max-template-document-size -pv 524287999
The above command will allow you to save the site/list to 500 MB. Increasing the size beyond 500 MB will not allow you to do so, it will throw an error. Just remember the default size is 10MB (10485760).
Well the above script is applicable for MOSS 2007, now lets see the script for SharePoint 2010.
For SharePoint 2010, open Windows PowerShell and type the below command:
$intTemplateSize=524287999
$svcWebService= [Microsoft.SharePoint.Administration.SPWebService]::ContentServiceIt is pretty easy to increase the size of template in SharePoint. This quick little stsadm command will allow to increase the template size for site and list both. Open the Windows Command Prompt and change the path to “C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN”\ and then type the below stsadm command:
stsadm -o setproperty -pn max-template-document-size -pv 524287999
The above command will allow you to save the site/list to 500 MB. Increasing the size beyond 500 MB will not allow you to do so, it will throw an error. Just remember the default size is 10MB (10485760).
Well the above script is applicable for MOSS 2007, now lets see the script for SharePoint 2010.
For SharePoint 2010, open Windows PowerShell and type the below command:
$intTemplateSize=524287999
$svcWebService.MaxTemplateDocumentSize = $intTemplateSize
$svcWebService.Update()
0 comments:
Post a Comment