Using SP 2013.
I have created a site definition in Visual Studio 2012.
Deployed that as a solution.
From the UI I can create a site and select the template I created.
However when I go into PowerShell and call GetAvailableTemplates
on the root web, its not there?
For the site I created (from my site def) I go into PowerShell and get SPWeb.WebTemplate
which is empty, SPWeb.WebTemplateID
contains the ID, which in my case in 10001
If I use SharePoint Manager that does actually show the name of the template. Weird.
If I go into Page Layouts and Site Settings, set to only use my Site Template (which is obviously in the list) ... going back to PowerShell and calling GetAvailableWebTemplates()
returns nothing...
I've read that it could be down to caching, but I don't think that affects Powershell ... i did an IIS reset anyway.