Skip to content

Instantly share code, notes, and snippets.

@pmatthews05
Created September 6, 2016 12:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmatthews05/cde78b4e7610f787406d3001bc6cc42d to your computer and use it in GitHub Desktop.
Save pmatthews05/cde78b4e7610f787406d3001bc6cc42d to your computer and use it in GitHub Desktop.
$devdb = “SP_DEVDB”
$intranetdb = “SP_IntranetDB”
$webApp = “SharePoint HNSC Web Application”
#Build Databases
new-SPContentDatabase -Name $devdb -WebApplication $WebApp -WarningSiteCount 0 -MaxSiteCount 1
new-SPContentDatabase -Name $intranetdb -WebApplication $WebApp -WarningSiteCount 0 -MaxSiteCount 1
$hnsc = Get-SPWebApplication | Where-Object {$_.DisplayName -eq $webApp}
New-SPSite -Name “CF Development” -Url https://dev.cfcode2016.com –HostHeaderWebApplication $hnsc -OwnerAlias “cfcode2016\SP_Setup” -Template “DEV#0” -contentDatabase $devdb
New-SPSite -Name “CF Intranet” -Url https://intranet.cfcode2016.com –HostHeaderWebApplication $hnsc -OwnerAlias “cfcode2016\SP_Setup” -Template “STS#0” -contentDatabase $intranetdb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment