I have one document library which has around 18000 documents(Total size of the all document is around 280 MB).

Now I want to make list template so I go to Library Settings and then click on Save document library as template and check Include Content.

Now after clicking on OK button, Request goes infinite, the page is never responding.

I have also tried this using PowerShell but it not helped. It throws following exception.

PS C:\Users\SP_Farm> $list.SaveAsTemplate("WFHistoryWithDocs","WFWithDocs","",$t
Exception calling "SaveAsTemplate" with "4" argument(s): "The list is too
large to save as a template. The size of a template cannot exceed 52428800
At line:1 char:1
+ $list.SaveAsTemplate("WFHistoryWithDocs","WFWithDocs","",$true)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : SPException*

So is there any other way to achieve my requirement?

  • You can give it a try using PowerShell script. You can refer this link to get idea.
    – users1100
    Jun 4, 2015 at 4:41
  • @Users1100 : I have also tried with PowerShell but not luck. You can check my updated question Jun 4, 2015 at 5:03
  • 2
    After looking at the error you are receiving, I think you should increase the size of maximum limit of Save List As Template. You can follow the instructions mentioned at this link.
    – users1100
    Jun 4, 2015 at 5:09

2 Answers 2


Issue resolved using PowerShell.

As "User1100" suggested I did need to set maximum list template size using following command

stsadm -o setproperty -propertyname max-template-document-size -propertyvalue 367001600

Or in SharePoint Powershell

$docSize = 367001600
$webservice = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$webservice.MaxTemplateDocumentSize = $docSize

Then also list template was not being saved then I realized that default maximum size for document in document library is 50MB by default (as List Template Gallery is document library). So I updated maximum document size from Central Admin - Manager Web Application - General Setting.

after that $list.SaveAsTemplate("WFHistoryWithDocs","WFWithDocs","",$t rue) worked successfully


  • Also max size for this setting is 524288000
    – Aaron
    Mar 19, 2018 at 14:25

And for those without powershell skills : Delete All items, save as template and then restore the deleted items. Ugly hack but it works

  • Wouldnt do that on production :-) Nov 21, 2019 at 11:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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