Search This Blog

Showing posts with label How to create new site collection using powershell. Show all posts
Showing posts with label How to create new site collection using powershell. Show all posts

Sunday, January 10, 2016

How to create new site collection using powershell

param
(
[string]$siteURL,
[string]$owner,
[string]$secondOwner,
[string]$template,
[string]$title,
[string]$description
)
try
{
New-SPSite $siteURL -OwnerAlias $owner -SecondaryOwnerAlias $secondOwner -name $title -Template $template -Description $description -ErrorAction Stop
}