Setup a SharePoint 2013 Development Environment: Farm and Service App Configuration

In this article I’ll be showing you how to complete a SharePoint 2013 development farm on a Hyper-V VM. This should help you fully explore the features of SharePoint in as quick and easy a manner as possible. By the end of this article, you’ll have your SharePoint 2013 environment running with all necessary Service Applications. Once that’s in place, you’ll be able to practice operational tasks like creating a web application, moving a site between site collections, and practicing how to restore unattached content databases in Sharepoint.

SharePoint 2013 Development Environment: Farm Configuration Prerequisites

I used evaluation editions of both Windows Server 2012 and SharePoint Server 2013, and SQL Server 2012 Express.

This is the third and final part of a series on setting up a SharePoint 2013 development environment. In part one, we prepared a Hyper-V VM for SharePoint 2013. Once the VM was ready, we had to install the prerequisites and then a basic installation of SharePoint 2013 in strictly a development or pilot installation. We’re ready to begin the farm configuration.

  • To make things easier, pin a couple of SharePoint items to the taskbar.
  • Log into your SharePoint 2013 VM, view the Start Screen, and type in SharePoint.
  • Right-click SharePoint Central Administration then click Pin to Taskbar. Do the same for SharePoint 2013 Management Shell.

Create Managed Service Accounts in Active Directory

The first thing we’ll need is two service accounts. One will run the web applications and one will run the service applications.

Using PowerShell or Active Directory Users and Computers, create the SVC_SPWeb and SVC_SPService accounts.

Example in PowerShell:

Import-Module ActiveDirectory
“SVC_SPWeb”,”SVC_SPService” | Foreach-Object {New-ADUser –Name $_ -SamAccountname $_ -AccountPassword (“MyPass123!” | ConvertTo-SecureString –AsPlainText –Force) –Passthru | Set-ADUser –Enabled $True}

Begin Farm Configuration

  • Open Central Administration by clicking the Shortcut icon we just pinned to the taskbar.
  • Logon to your SharePoint site as a farm administrator. Because this is a very isolated environment used only as a dev environment, I’m using the domain administrator account for my local active directory domain.
  • At the Central Administration page, if the “Perform Farm Configuration” option comes up, click Cancel to select the “No, I will configure everything myself” option. This is really helpful because it will serve you well to understand the process of creating the service applications that the configuration wizard would create for you, and you can see how easy it is to create them in your production farm later.

SharePoint 2013 dev environment Farm Configuration

Enter Service Accounts as Managed Service Accounts

  • In Central Administration, click Service Accounts from under the heading “Security.”

SharePoint 2013 dev environment Service Accounts

  • On the Service Accounts page, click Register new service account.

SharePoint 2013 dev environment Service Accounts

  • At the Register new service account page, enter the credentials for <Domain>\SVC_SPWeb and <Domain>\SVC_SPService. Use your domain name preceding the slash. You can choose to have SharePoint manage the password, which is recommended in Production farms (but is completely up to you for this farm).

SharePoint 2013 dev environment: Enter Credentials


Create Service Application App Pool

We need an application pool to run all of our service applications.

  • Open SharePoint Management Shell, then create the Service Application App Pool like this: New-SPServiceApplicationPool –Name “Service Application Pool” –Account “<Domain>\SVC_SPService”

Create Service Applications

Follow along to create the service applications you’ll need for your SharePoint 2013 environment.

State Service Application

We start by creating the State Service Application itself. There are some additional steps to take on the State Service Application, so we pipe the results to both the screen and a variable called “StateService” by using the Tee-Object cmdlet.

New-SPStateServiceApplication –Name “State Service Application” | Tee-Object –Variable StateService

We now have the $StateService variable that we can pipe into other cmdlets for creating the Service Application Proxy and the State Service Database.

$StateService | New-SPStateServiceApplicationProxy –DefaultProxyGroup

$StateService | New-SPStateServiceDatabase –DatabaseName “StateServiceDB” | Initialize-SPStateServiceDB

Usage and Health Data Collection Application

Creating the Usage and Health Data Collection Application is done in the SharePoint Management Shell.

New-SPUsageApplication –Name “Usage and Health Data Collection”

(Get-SPServiceApplicationProxy | Where-Object –Property TypeName –eq –Value “Usage and Health Data Collection Proxy”).Provision()

More Service Applications Available from Central Administration

From here, you have many available service applications.

  • Open Central Administration and under the heading “Applications,” select Manage Service Applications.

SharePoint 2013 dev environment: Manage Service Applications

  • At the Service Application page, click New to get a list of service applications that you can choose to install. Some of the service applications have specific requirements, but for the typical service application, you have a few items that are the same.
  • Choose the service application that you want to install. You’ll briefly see the SharePoint 2013 “Working On It” notification.

SharePoint 2013 dev environment: Working On It

  • Once the service application dialog box opens, name the service application. Change the database name to be something easy to identify such as “BusinessConnectivityServiceDB.”
  • For the application pool, select Use existing application pool, and then choose Default Service Application Pool or whatever you named your service application pool earlier.
  • Once completed, click OK. SharePoint will start creating the service application for you.

Create a Web Application and a Site Collection

Now that you’ve gotten your farm configured and your service applications created, it’s time to create a SharePoint site.

  • We’ll start with creating a web application. In Central Administration, click Manage Web Applications under the Web Applications heading.
  • At the web applications page, click New. A window shows up for you to specify what you want for your web application.

SharePoint 2013 dev environment: Create New Web Application

  • Some of the important points to note are host header, where you would want to specify the name of the web application. This is especially important if you’re planning on having multiple web applications on port 80. For our exercise, you can leave it blank if you choose.
  • At the Application Pool section, be sure to create a new application pool to hold your web application. Select Create a New Application Pool and then choose SVC_SPWeb from the list of managed accounts.

SharePoint 2013 dev environment: Configure Web Application

  • For the database settings, you can choose a different name for your content database if you like. Leave the service application group to default. Once you’ve got your web application settings the way you want, click OK.

Create a Site Collection

The last thing we need to do to start really playing with your environment is to create some site collections in your web application.

  • From Central Administration, select Application Management. At the Application Management page, select Create Site Collections.
  • At the Create Site Collections page, make sure that the web application you want to create the site collection in has been selected from the dropdown menu. Then add a site title and description.
  • Next you’ll choose the managed path in which the site collection is placed. If you choose an explicit managed path, your site collection is placed right at the root of the managed path. The “root” managed path (“/”) is already created for you and you can choose that as your site collection. If you choose a wildcard managed path, then you won’t create a site directly at the managed path, but you will create your path to directly follow the managed path. “Sites” is a wildcard managed path that already exists for your web application.
  • Finally, choose a template to assign to your first site in the site collection and assign a site collection administrator. If you want to assign a quota, you’ll need to create one first. Once you’ve made your selection, click OK to create your new SharePoint site.

Well, now the fun begins. You’ve gotten your SharePoint 2013 “personal dev” farm up and running with a web application, a site collection, and service applications. Have fun and start exploring with service applications, web applications, host headers, and site templates. You can even practice doing some operations like backup and restores, as well as working on scripts that can be used later in a production environment.

I hope that you’ve learned a lot and had fun setting up your SharePoint 2013 development environment. Catch me on Facebook, Twitter, or at my personal blog to say hi and let me know how your dev environment on Hyper-V is working for you.