Pages

Thursday, March 29, 2012

Creating a New Site Collection from a Custom Web Template in Powershell


I just wasted a bunch of time re-figuring this out b/c I had forgotten, so here is how you do it.

1. Get your web template name


Get-SPWebTemplate | format-table name


This will give you the full name of your custom web template, which will be {[Template Feature GUID]}#[TemplateName]}

2. Create the site collection with powershell:


New-SPSite -url [Your URL] -
ownerAlias [Site Collection Admin Doman\Username] -Template {Web Template Name}