I have custom site template file which i got from the SP2007 site as .stp file..


What i need to do is Deploy this site template to SharePoint 2010 Farm..

I know i can do it from stsadm command.. But i need to do it from Powershell command..

If this is not possible please give me a way to install this site template site collection wise..

Basically im asking replacement for following command with Powershell..

Stsadm.exe -o addtemplate -filename C:\CustomTemplate.stp -title "Custom Site"

2 Answers 2


It can't be done SharePoint 2010 doesn't support .stp Site Templates only .stp List Templates and .wsp Site Templates.

See TechNet article: Deploy templates (SharePoint Foundation 2010)

It says:

The STP format of a custom site template (.stp file) is deprecated in SharePoint Foundation 2010 and replaced with WSP format site templates. In Windows SharePoint Services 3.0, users can save an existing site as a custom site template. The site template is stored in the database as a model, and users can select the site template as a foundation that defines how to instantiate the site. In SharePoint Foundation 2010, users can save an existing site as a template. The template is saved as a .wsp file in the Solution Gallery of the top-level site in a site collection, where it becomes available for subsite creation on all Web sites in the site collection

See this earlier question on how to upgrade site Templates: Moving Site Template (.stp) files to SharePoint 2010

  • Ok.. other than deploying can i upload this to site template gallery by using powershell.. Oct 10, 2013 at 7:19
  • OK guys.. as you mentioned this is imposible.. So i found a way to run stsadm commands inside powershell.. thank you for your help.. Oct 10, 2013 at 8:20
  • Well yes. You can add a .stp Site Template using STSADM -o AddTemplate, but when you try to use it you'll just get the error message Microsoft SharePoint Foundation version 3 templates are not supported in this version of the product.. So even though STSADM lets you add the template it's of no use which is why I wrote that it's not possible. Oct 10, 2013 at 9:30
  • Yes.. But from the inside of stp im changing the current sharepoint version and try to upload that in to sharepoint site.. in that case i succeed to add custom template into sharepoint 2010 site.. Thank you for your help.. Oct 15, 2013 at 9:37

SP2010 doesn't work with STP files anymore. SharePoint 2010 supports only wsp solutions.

Commad to deploy webtemplate wsp is

Install-SPWebTemplate -path "C:/webtemplates/test1.wsp" -name "test1" -description "TestWSP" -Confirm:$false

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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