SharePoint Custom List Templates

In SharePoint Online, when creating a new list, also known as a Microsoft List, there are several templates to pick from, in order to save some time.  In your company, if you have a specific template that you would like to create, to be used in any SharePoint site, there is a way to create a custom list template, using PowerShell, if you’re a SharePoint admin.

When you click to create a new list, if you do not see “From your organization” here, that means that this feature has not rolled out to your tenant yet.

sharepoint-create-list-from-your-organization

First of all, you can at any time create a list from an existing list in SharePoint, without the need for a template, but if you would like to have your own organization’s templates listed on the From your organization tab, the easiest way to do that is to start with an existing list.  Once you’ve determined which list that is, it’s time to crack open PowerShell.

1.  Click the Start menu on your computer, and type ISE.  Right click on Windows PowerShell ISE, and choose Run as Administrator.

start-windows-ise-powershell

2.  Here are Microsoft’s official instructions on this process, and their link to Download the latest SharePoint Online Management Shell, which you’ll need now.  You’ll need to be in the SharePoint Admin role in your tenant in order to be able to do the next step.

3.  At the beginning of my script, I always run an “Update-Module” command, to make sure the SharePoint PowerShell on my computer is on the latest version.   Here is the whole script, and I’ll explain it in the next steps. I don’t recommend copying and pasting this. Those numbers at the beginning of each line are not part of the code, I’m using them to explain each line here.

1 Update-Module Microsoft.Online.SharePoint.PowerShell

2
Connect-SPOService
-Url “https://yourcompany-admin.sharepoint.com”

3
$extracted
= Get-SPOSiteScriptFromList –ListUrl “https://yourcompany.sharepoint.com/sites/yoursite/Lists/YourList”

4
$listscript
= Add-SPOSiteScript -Title “IW Mentor Company Store” -Description “This creates a company store list” -Content $extracted

5
Add-SPOListDesign
-Title “IW Mentor Company Store” -Description “Keep track of departmental available supplies” -SiteScripts $listscript.Id -ListColor Blue -ListIcon BullseyeTarget –Thumbnail “https://yourcompany.sharepoint.com/sites/yoursite/SiteAssets/yourimage.jpg

4.  When connecting using the Connect-SPOService command in line 2, this is where you’ll use the name of your tenant, with a hyphen admin.sharepoint.com.  Again, if you’re not a SharePoint admin in the tenant, this command won’t work.

5.  In line 3, this is where you point it to where the current list is that you’d like to copy, to run Get-SPOSiteScriptFromList.  This is the full URL to the list, and notice that I didn’t include anything after the name of the list, there’s no allitems.aspx. This line is getting the list and setting it in a variable.

6.  Line 4 is using the list you just obtained, and running the Add-SPOSiteScript command on it.  This is where you tell it what you want the title and description to be, but this is just the title and description of the site script, not the template that end users will see.

7.  Line 5 is where your list template gets added to the list of “From your organization” templates.  The title and description that you type here, will be what is listed when end users are looking at the templates to pick from your organization.

sharepoint-list-template-from-your-organization

For the ListColor, here are the colors to choose from: DarkRed, Red, Orange, Green, DarkGreen, Teal, Blue, NavyBlue, BluePurple, DarkBlue, Lavendar, Pink
For the ListIcon, here are the icons to choose from:

Bug office-ui-bug Calendar office-ui-calendar BullseyeTarget office-ui-bullseyetarget
ClipboardList office-ui-clipboardlist Color office-ui-color Rocket office-ui-rocket
Insights office-ui-insights CubeShape office-ui-cubeshape TestBeakerSolid office-ui-testbeakersolid
Robot office-ui-robot Savings office-ui-savings Airplane office-ui-airplane

That last part of the code, the Thumbnail, is where you tell it which image to use, to represent your list.  You can see that in mine, it’s a picture of someone at a computer, and that picture is referred to in the spot of the code yourimage.jpg

When referring to an image, it should already be uploaded to SharePoint somewhere, and I recommend putting it in a library that everyone has access to, so that they will be able to see the image.

8.  When you click on a template from the Create a list screen, this is the next screen.  You can click through your organization templates down the left side, and get a preview of the columns that exist in them.  Also, notice that for this first list, I used the color blue and the icon BullseyeTarget, and you can see those represented at the top next to the name of the template. Click Use Template on this screen, to create your new list from this template.

sharepoint-custom-list-templates-choose

And that’s it!

When people use the template, there won’t be any data pre-populated in the list, it will always be empty.  Also, there is an additional command called Grant-SPOSiteDesignRights, which is supposed to allow you to deem only a certain security group of people to be able to see that template.

We covered this and more, in this hour-long free video, demonstrating this whole process on our weekly Power Hour show:

power-hour-sharepoint-list-template-2021

Again, here is Microsoft’s full documentation: Creating custom list templates

Here is Microsoft’s official PowerShell documentation

10 comments

  • Reblogged this on Novia – Simon's Place Online (SPO) and commented:
    I’m going to finish my blog on all types of Templates across M365 at some point. In the meantime, here is an excellent and straightforward WonderLaura article on creating your own Microsoft List templates. I shall be leaning on this in my article (plagiarism being the highest form of flattery, they say)

  • This is a terrific article, thanks Laura. I love these kind of back door ways to avoid writing code and create a great user experience. I have reblogged it and will incorporate the ideas into a breadth article on all types of templates I have been working on for far too long, if that’s OK (referenced to you, of course) : -)

  • Does your website content include how to clone a library with its metadata and a couple of small files within the same site or to another site, without the loss of the metadata? How about into the Teams Channel? Thanks!

  • do you know if this works accross different sites? I tried to use it from one site colleciton to another and i got an error “The parent content type specified by content type identifier (big long GUID) does not exist. The content type its complaining about is the parent content type of my documents which is coming from the admin content type galler.

    • Was your content type created in the content type hub? Or is it just a custom content type in that site? If it’s just in that site, other sites won’t know about it, and I wouldn’t be surprised if it doesn’t work. Try creating something pretty generic without a custom content type, and you’ll see that it does work across sites.

  • “When you click to create a new list, if you do not see “From your organization” here, that means that this feature has not rolled out to your tenant yet.”

    Who rolls that out? Microsoft or me as the SP Admin? I wish MS didn’t disable so many useful things.. 10 hoops to jump through before you can do what SP 2013 did in a couple clicks.

  • Hi Laura. Thanks for these instructions. May I please ask whether JSON view formatting applied to the base list used in site script creation is meant to come across in the deployed list template? I formatted a gallery view with JSON prior to deploying the list template, but when creating lists from the template the custom formatting is not there. Hoping you can shed some light. Thank you.

Leave a Reply