0

How to create default site collection if After sharepoint installation sharepoint default site collection does not exist using powershell script. I need this because at time of activation of extenal content type feature, business data model if default site collection does not exist than in Bussiness Connectivity Service i am not able to find my external type model.

So plz guide my how can i check default site collection exist or not using powershell script.

1
  • Is this for SharePoint 2010 or 2013? Commented Nov 8, 2013 at 13:33

1 Answer 1

1

For SharePoint 2013 I found the following PowerShell code in an article about Host-named Site Collections. I think the PowerShell code is the same for SharePoint 2010:

Creating a root site collection

A root site collection is a requirement for any Web application. It is also necessary for crawling content. This site collection must have the same URL as the Web application. Currently, SharePoint prevents the creation of a host-named site collection with the same URL as a Web application. Therefore, the root site collection is created as a path-based site collection.

New-SPSite 'http://<servername>' -Name 'Portal' -Description 'Portal on root' -OwnerAlias 'contoso\administrator' -language 1033 -Template 'STS#0' 

source: http://technet.microsoft.com/en-us/library/cc424952.aspx#section2b

1
  • How to check root site is created or not using powershell? Commented Nov 9, 2013 at 6:28

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.