Wednesday, 6 November 2013

Create a site collection in SharePoint 2010 using powershell Script

Share it Please
  1.Click "Start" button
    2.Choose the "Microsoft SharePoint 2010 Products"
    3.Click the "SharePoint 2010 Management Shell" [ run as Administrator ]


Script :-

$siteURL = "http://Abcd:32033/sites/Test1";

$owner = "Abcd\Administrator"

$secondOwner = "Abcd\Administrator"

$template = "STS#0"

$description = "This is a sample site that was built using PowerShell."

New-SPSite $siteURL -OwnerAlias $owner -SecondaryOwnerAlias $secondOwner -name “PowerShell for SharePoint” -Template $template -Description $description

Note:-

siteURL  = Enter your Site Collection url based on your Webapplication url.
Owner =  Enter Your owner of the particular site Collection
secondOwner = Enter the  second owner of the site collection
Template = Choose your Template

 For Example

STS#0 is for create  Team Site
STS#1  is for create  Blank Site

STS#0 Team Site WSS
STS#1 Blank Site WSS
STS#2 Document Workspace WSS
MPS#0 Basic Meeting Workspace WSS
MPS#1 Blank Meeting Workspace WSS
MPS#2 Decision Meeting Workspace WSS
MPS#3 Social Meeting Workspace WSS
MPS#4 Multipage Meeting Workspace WSS
CENTRALADMIN#0 Central Admin Site WSS
WIKI#0 Wiki Site WSS
BLOG#0 Blog WSS
BDR#0 Document Center MOSS
OFFILE#1 Records Center MOSS
OSRV#0 Shared Services Administration Site MOSS
SPS#0 SharePoint Portal Server Site MOSS
SPSPERS#0 SharePoint Portal Server Personal Space MOSS
SPSMSITE#0 Personalization Site MOSS
SPSMSITE#0 Contents area Template MOSS
SPSTOPIC#0 Topic area template MOSS

No comments:

Post a Comment

Followers

Follow The Author