How to Save List as a Template using PowerShell in SharePoint?

Requirement: Save a SharePoint list as a template using PowerShell.

How to Save List as a template in SharePoint?

List templates in SharePoint provide great re-usability without recreating every single column. E.g., you may have created a custom list (say: Projects) in a SharePoint site collection with all relevant columns, and now you might want this list structure in other site collections without recreating the list on every single site. To save a list or library as a template:

  1. Go to your SharePoint list >> Navigate to list settings by going to the List tab on the ribbon and then List Settings.
  2. Click on “Save list as Template” under the “Permissions and Management” group.
  3. Provide the name for the template File and Template name.
  4. Choose the appropriate option for “include content” and click OK.
    how to save list as template in sharepoint 2013

You will see the “Operation Successful” page, and your template will be uploaded to the “List Template Gallery”.

Generally, it’s a good idea to create list templates at top-level site, so that any site underneath can utilize the template!

PowerShell Script to save a list as a template:

Here is how to save a list as a template in SharePoint 2013 using PowerShell.

#Add SharePoint Snapin
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue 

#Configuration parameters
$ListName="Parent Projects"
$TemplateName="Parent Project Template"
$TemplateDescription="Crescent Inc. Parent Project List Template"
$SaveData = $true

#Get the Web and List objects
$Web = Get-SPWeb $WebURL
$List = $Web.Lists[$ListName]

#Save List as Template
$List.SaveAsTemplate($TemplateFileName, $TemplateName, $TemplateDescription, $SaveData)
Write-Host "List Saved as Template!"
save list as template sharepoint 2013 using powershell

Now, You can create a new list instance from the template saved: Create List from List Template in SharePoint using PowerShell

If you need to save a SharePoint Online List as a template, use: SharePoint Online: PowerShell to Save List as Template

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

4 thoughts on “How to Save List as a Template using PowerShell in SharePoint?

  • Thank you so much !!! awesome blog this is what i wanted…

  • Is it possible this changes using Javascript or PNP JS?

  • Can you save template from a .csv and overwrite the existing template?


Leave a Reply

Your email address will not be published. Required fields are marked *