Introduction
In this article we explore creation of a new Site Collection or Web Application by PowerShell, we have the option to apply the Site Template directly.
However, for PowerShell to accept it, you must provide it the Template ID (for example:APPCATALOG#0).
When creating a new site collection from Central Administration, we can select a site template from the Template Selection section. But sometimes we may need to create sites from the PowerShell using CMDlet commands. At that time we need to provide the site template name not the site template Title.
One can easily use the Get-SPWebTemplate command to get a list of all the templates in the SharePoint environment.
For example, to create an App Catalog site:
New-SPSite -Url http://sp:1001/sites/AppCatalog -OwnerAlias "serverName\sp_admin" -Name “App Catalog site" -Template "APPCATALOG#0"
Here is the SharePoint 2013 Site Template ID List for PowerShell:
In this article we explore creation of a new Site Collection or Web Application by PowerShell, we have the option to apply the Site Template directly.
However, for PowerShell to accept it, you must provide it the Template ID (for example:APPCATALOG#0).
When creating a new site collection from Central Administration, we can select a site template from the Template Selection section. But sometimes we may need to create sites from the PowerShell using CMDlet commands. At that time we need to provide the site template name not the site template Title.
One can easily use the Get-SPWebTemplate command to get a list of all the templates in the SharePoint environment.
For example, to create an App Catalog site:
New-SPSite -Url http://sp:1001/sites/AppCatalog -OwnerAlias "serverName\sp_admin" -Name “App Catalog site" -Template "APPCATALOG#0"
Here is the SharePoint 2013 Site Template ID List for PowerShell:
No comments:
Post a Comment