Thursday 23 August 2012

Get Internal Name of Custom List Template

I was trying to create the document libraries & lists by selecting the custom library & list templates. Creating each list & library was a time consuming task. So I decided to create lists & libraries using powershell script. After creating the powershell script I fetched the list /library name & the custom template name from the csv file.

To know more about the script visit this link
http://spcodes.blogspot.in/2012/08/create-multiple-libraries-using-custom.html

When I executed the script, it came to the observation that the name of the custom template in the csv file should be the internal name of that template & not the display name.

To get the internal name of the Custom Template use the following powershell script:


$site = Get-SPSite -Identity http://applicationname/sites/sitename
$site.GetWebTemplates(1081) |  Where-Object {$_.name -like "*[CustomLibraryTemplateDisplayName]*"} | Select Name


Save the following code with the .ps1 extension & execute the script using SharePoint Management Shell.

No comments:

Post a Comment