WEBSITE

Sharepoint 2013 : Join a Server to the SharePoint Farm, Create a New Web Application, Create a New Site Collection

12/22/2013 6:50:38 PM

1. Join a Server to the SharePoint Farm


Scenario/Problem: You need to join the servers to the new SharePoint farm.


Solution: Use the Join-SharePointFarm cmdlet from the SPModule.

The previous cmdlet (New-SharePointFarm) created the database and configured the SharePoint farm. You cannot run this again on the other servers. Instead, you need to join the servers to the farm using the Join-SharePointFarm cmdlet:

Join-SharePointFarm -databaseserver <database server name>
-configurationdatabasename <config database>
-passphrase (ConvertTo-SecureString -asplaintext -force -string
"<farm pass phrase>")

The farm passphrase used with the Join-SharePointFarm cmdlet should be the same passphrase used when you are creating the new SharePoint farm.

2. Create a New Web Application


Scenario/Problem: You need to create a new web application for the SharePoint farm.


Solution: Use the New-SPWebApplication cmdlet from the SharePoint 2013 Management Shell.

You can now use the SharePoint 2013 Management Shell because SharePoint has been installed and the SPModule commands have been utilized. If you are running a full script and/or still want to use the PowerShell console, be sure to add the SharePoint snap-in (Add-PsSnapin Microsoft.SharePoint.PowerShell) so that the SharePoint cmdlets are available.

To add a new web application, use the New-SPWebApplication cmdlet as follows:

New-SPWebApplication -applicationpool <name of new application pool>
-name <name of new web app>
-applicationpoolaccount <service account to be used for the
application pool> -port <desired port number>

Listing 1 shows a sample command-line entry for creating the main SharePoint web application.

Listing 1. Creating a New Web Application


New-SPWebApplication -applicationpool SharePoint-80
-name SharePoint-80 -applicationpoolaccount SP\AppPoolAccount -port 80


This process might take a few minutes. When it completes, the console presents the display name and the URL of the new web application.


Tip

If you do not include the port number, a random port number will be assigned. The first web application created will use port 80.


3. Create a New Site Collection


Scenario/Problem: You need to create a new top-level site collection.


Solution: Use the New-SPSite cmdlet from the SharePoint 2013 Management Shell.

To add a new site collection, use the New-SPSite cmdlet as follows:

New-SPSite -url <full url of new site collection>
-name <name of new site collection>
-owneralias <site collection administrator>
-template <site collection template to use>

Listing 2 shows a sample command-line entry for creating the root site collection using the Team Site template.

Listing 2. Creating the Root Top-Level Site Collection


New-SPSite -url http://sp2013/ -name Home -owneralias SP\SiteAdmin
-template STS#0


You can find the site template names using Get-SPWebTemplate. If no template is provided, the site collection is still created. In this case, after the site is accessed via the browser, SharePoint prompts for the selection of a site collection template.

Other  
  •  Sharepoint 2013 : Install Without a Product Key in the Configuration File, Configure a New SharePoint Farm
  •  Sharepoint 2013 : Prepare the Microsoft SharePoint Installation Module , Install SharePoint Unattended
  •  Sharepoint 2010 : Putting Your Site on the Web - Additional Features
  •  Sharepoint 2010 : Putting Your Site on the Web - Key Terms and Architecture , Richer User Experience
  •  Sharepoint 2010 : Putting Your Site on the Web - Web Content Management (part 2) - Web Publishing 101
  •  Sharepoint 2010 : Putting Your Site on the Web - Web Content Management (part 1)
  •  Sharepoint 2010 : Using an External Data Column, Building a Composite Application
  •  ASP.NET 4 in VB 2010 : Page Tracing (part 3) - Application-Level Tracing
  •  ASP.NET 4 in VB 2010 : Page Tracing (part 2) - Writing Trace Information
  •  ASP.NET 4 in VB 2010 : Page Tracing (part 1) - Enabling Tracing, Tracing Information
  •  
    Top 10
    Extending LINQ to Objects : Writing a Single Element Operator (part 2) - Building the RandomElement Operator
    Extending LINQ to Objects : Writing a Single Element Operator (part 1) - Building Our Own Last Operator
    3 Tips for Maintaining Your Cell Phone Battery (part 2) - Discharge Smart, Use Smart
    3 Tips for Maintaining Your Cell Phone Battery (part 1) - Charge Smart
    OPEL MERIVA : Making a grand entrance
    FORD MONDEO 2.0 ECOBOOST : Modern Mondeo
    BMW 650i COUPE : Sexy retooling of BMW's 6-series
    BMW 120d; M135i - Finely tuned
    PHP Tutorials : Storing Images in MySQL with PHP (part 2) - Creating the HTML, Inserting the Image into MySQL
    PHP Tutorials : Storing Images in MySQL with PHP (part 1) - Why store binary files in MySQL using PHP?
    REVIEW
    - First look: Apple Watch

    - 3 Tips for Maintaining Your Cell Phone Battery (part 1)

    - 3 Tips for Maintaining Your Cell Phone Battery (part 2)
    VIDEO TUTORIAL
    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 1)

    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 2)

    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 3)
    Popular Tags
    Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8 BlackBerry Android Ipad Iphone iOS