The client would like to limit the available site templates a user can choose from in his My site.
Since a mysite is a site collection – you can’t limit the available templates within a My site.
I can manually update my AreaTemplateSettings page and limit the Subsite Templates of my personal My Site.
I would like to use powershell and loop through all My Sites and limit this list.
How can I use powershell to update the Subsite Templates on AreaTemplateSettings.aspx
(most of the users will not be capable of manually updating the templates)
Maybe this script will help you start, the only thing you have to do is loop through all the my site sitecollection.
http://gallery.technet.microsoft.com/scriptcenter/Limit-available-web-6ceacba0
# array of template names (not titles) to keep
$templateNamesToKeep = “STS#0″,”PROJECTSITE#0″,”BLOG#0”
Start-SPAssignment -Global $web = Get-SPWeb <URL of site>
# get the existing web templates from the site that will be filtered down
# 1033 is the locale id for English US (en-us), be sure to change to your locale
$existingWebTemplates = $web.GetAvailableWebTemplates(1033)
$newWebTemplates = New-Object “System.Collections.ObjectModel.Collection[Microsoft.SharePoint.SPWebTemplate]”
# filter existing web templates and only keep if in the list of template names to keep
$newWebTemplates = $existingWebTemplates | Where-Object {$_.name -in $templateNamesToKeep} $web.SetAvailableWebTemplates($newWebTemplates, 1033)
$web.Update()
Stop-SPAssignment -Global
Hey.. I am not sure if this is exacly what you need but check this out:Â http://absolute-sharepoint.com/2012/06/restrict-the-new-site-available-templates-with-powershell.htmlÂ