SharePoint 2010 Server Scripting: Installing a Site Collection

December 8th, 2009 Published by Chris Schwab
This entry is part 5 of 8 in the series SharePoint 2010 Installations

I’ll make this one quick today. I promised a few days ago…ok you’re right, maybe it was more like a week ago in my Unattended WebApp Install, that I’d get the site collection script out there. Since then I’ve needed to test a few deployment scenarios, and I just now got a chance to get this puppy cleaned up. Don’t forget to modify the variables to suit your environment. I also included a list of templates you can use if you are installing foundation as well.

Add-PsSnapin Microsoft.SharePoint.PowerShell
# base template values
# Name                 Title                                    LocaleId   Custom
# ----                 -----                                    --------   ------
# GLOBAL#0             Global template                          1033       False
# STS#0                Team Site                                1033       False
# STS#1                Blank Site                               1033       False
# STS#2                Document Workspace                       1033       False
# MPS#0                Basic Meeting Workspace                  1033       False
# MPS#1                Blank Meeting Workspace                  1033       False
# MPS#2                Decision Meeting Workspace               1033       False
# MPS#3                Social Meeting Workspace                 1033       False
# MPS#4                Multipage Meeting Workspace              1033       False
# CENTRALADMIN#0       Central Admin Site                       1033       False
# WIKI#0               Wiki Site                                1033       False
# BLOG#0               Blog                                     1033       False
# SGS#0                Group Work Site                          1033       False
# TENANTADMIN#0        Tenant Admin Site                        1033       False
$sp_sc_template = "STS#0"
$sp_sc_webappurl =http://yoururl
$sp_sc_name = "Home"
$sp_sc_language = 1033
$sp_sc_owner = "domain\username"
new-SPSite -url $sp_sc_webappurl -OwnerAlias $sp_sc_owner -Language $sp_sc_language -Template $sp_sc_template -Name $sp_sc_name

 
  1. No comments yet.
  1. No trackbacks yet.

 cschwab@fpweb.net