SharePoint – PowerShell Script to Create multiple Sub Sites

From below PowerShell Script we can create multiple sub sites in specific application

param([string] $url,[Array] $sites)
foreach($s in $sites)
{
New-SPWeb -URL ($url + $s) -Template BLANKINTERNET#1 -Name $s
}

Result:

PowerShell Script

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s