Wednesday, 19 November 2014

How to Create a Site Collection using Power Shell in SharePoint 2010

In this article I am showing you how to perform Import/Export operation of a particular SharePoint site using Power Shell

1. On the Start menu, click All Programs.

2. Click Microsoft SharePoint 2010 Products.
3. Click SharePoint 2010 Management Shell.
4. At the Windows Power Shell command prompt type the following command:

1.gif

5. You will get a Power shell command prompt like below

2.gif

6. In SharePoint 2010, Power Shell command Get-SPWebTemplate is used to export the site

7. Please see the screen shot for the Power Shell command

$template = Get-SPWebTemplate "STS#0"
New-SPSite -Url "your Site collection URL" -OwnerAlias "domain\user" -Template $template

3.gif

8. Where STS#0" represent a team site template

9. Please make sure you have created a managed path for the same. I will cover creating managed path in another article

10. You can use the below command to display basic information about all the STS templates

Get-SPWebTemplate "STS*"

4.gif


Reference:

http://www.c-sharpcorner.com/uploadfile/Roji.Joy/how-to-create-a-site-collection-using-power-shell-in-sharepoint-2010/

No comments:

Post a Comment