Addtemplate: Stsadm operation (Office SharePoint Server)

Updated: April 26, 2007

Applies To: Office SharePoint Server 2007

Updated: 2007-04-26

Operation name: Addtemplate

Adds a site template to the template gallery.

Note Note:

If you want the changes to the template list to take effect immediately, run the iisreset command after you run the addtemplate operation.

Syntax

stsadm -o addtemplate

   -filename <file name>

   -title <title>

   [-description] <description>

Parameters

Parameter

Value

Required?

Description

filename

A valid file name, such as “C:\Templates\SampleTemplate.stp”

Yes

File name of the template that you are adding

title

A valid title of a template, such as “Sample Template”

Yes

Title of the template that you are adding

description

A valid description of the template, such as “This is a sample template”

No

Description of the template that you are adding

Community Content Add
Annotations FAQ
Template is available in web interface
The site template does become available in the web interface after the addtemplate operations successfully takes place. Although I have never heard of it called a "global template gallery," the globally available site templates that can be applied at the top level of any site collection on the farm (ie, not limited to a single web application), do show up in the "Select a template" list in the Create a site template page, under the custom tab.

Maybe, if you stretch it, that list can be considered a global gallery, able to display all globally available templates to use for site collections, grouped under tabs indicating whether they were built in (such as the collaboration and meeting templates), or added (for example, application templates or custom).

Regardless-- once you "addtemplate" the template you added does become available in the GUI to apply to any site you wish within the farm.
Global template gallery not visible through web interface
Contrary to nuclear's edit above, I do not believe there is any way to view these templates through the web interface.
template ID

When you add the template with "addtemplate", you have to do "iisreset" and then you can see the GLOBAL ID of your template with the command:

"stsadm -o enumtemplates"