In PowerShell, if you want to remove a web template from the New Site dialog for a specific web, take a look at the following script: function Remove-SPWebTemplate { [CmdletBinding()] param( [parameter(Position=1,Mandatory=$true)][Microsoft.SharePoint.SPWeb]$web ) process { $templateList = New-Object "System.Collections.ObjectModel.Collection``1[[Microsoft.SharePoint.SPWebTemplate, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c]]" $availableWebTemplates = $web.GetAvailableWebTemplates(1033); $availableWebTemplates | Where{ $_.ID -ne 53 } | […]
↧