Creating Multiple Site Collections in SharePoint 2010 using Windows PowerShell

Video length: 4:03

Video description: This video walks through the process of creating multiple site collections with multiple content database names in SharePoint 2010 using Windows PowerShell.

To create multiple site collections in SharePoint 2010 using windows PowerShell:

In SharePoint 2010 Management Shell, type the follwoing script. On the last line, presee ENTER twice to create a blank line and execute the script

 $i = (“Sales”, “Marketing”)
ForEach($url in $i)
New-SPContentDatabase -Name WSS_Content_Intranet_$url -WebApplication
New-SPSite -Url$url -ContentDatabase WSS_Content_Intranet_$url -OwnerAlias Contoso\Administrator -Template “STS#0”

Note: You will need to change the web application link to reflect your own web application as well as the OwnerAlias domain\account information.

Leave a Comment