Install SharePoint 2013 SP1 using AutoSPInstaller

By | May 10, 2014

AutoSPInstaller is a set of PowerShell scripts and directory structure that helps to automate SharePoint installations. This tutorial assumes that you already have installed Windows Server 2012 R2 and SQL Server SP1 from the post Setup virtual SharePoint 2013 development environment using Oracle Virtualbox. This is however not a necessity as long as you change computer names, references and user accounts to match your own setup.

Some of the benefits of using AutoSPInstaller to install your SharePoint servers are:

  • The configuration XML file of AutoSPInstaller works like a checklist which can improve the quality of your installations. (For example properly configured service accounts and other security rights, less “quick-fixes” after installation is complete etc…)
  • Automated installation reduce installation and configuration time.
  • Since there are less manual work involved you know that when you do the installation the next time it will be exactly as last time (hopefully – would not make any promises here. After all, it is still SharePoint :))

The architecture of the SharePoint 2013 farm:


This post is the second post in the series of posts with the theme SharePoint 2013 BI Development Environment which includes the following topics:

SharePoint 2013 BI Development Environment tutorial

  1. SharePoint 2013 development environment using Virtualbox
  2. >Install SharePoint 2013 SP1 using AutoSPInstaller<
  3. Configure SharePoint 2013 Business Intelligence Services
  4. SharePoint 2013 Business Intelligence kerberos configuration



Below is required software installation medium/ISO files

  • Microsoft Windows Server 2012 R2
  • Microsoft SharePoint Enterprise Server 2013 SP1 (Note that enterprise is required for Business Intelligence features)

Prepare environment

SharePoint 2013 service accounts

In Active Directory Computers And Users create the following service accounts:

Account Description
SP2013_C2WTS Claims to windows token services
SP2013_Crawl Search crawl
SP2013_ExcelServices Excel Services
SP2013_Farm Farm account
SP2013_PowerPivot Power Pivot Services
SP2013_PPS Performance Point Services
SP2013_Profiles Profile Services Application & sync
SP2013_RS Reporting Services
SP2013_Search Search Services
SP2013_Services Various services
SP2013_WebApp Used for web application pools
SP2013_Install Installation account
SP2013_DataAccess Used for unattended data access for BI services

Configure Installation account access

  • Add account SP2013_Install to local admin on SharePoint server (Grammi).
  • Create a login to SP2013_Install on SQL Server (Tummi). Assign the login dbcreator, securityadmin roles:

sp2013 sql install account permissions


AutoSPInstaller will take care of any other permissons needed.

Note: If you are lazy and try to run as the domain administrator account you might get this error(s):
secure store error

So take the time to create the installation account 🙂

Prepare for user profile synchronization

Login to your domain controller machine. (created as virtual server Zummi in previous post)

  1. Open Active Directory Users and Computers.
  2. Right click your domain ( in this tutorial)
  3. Select Delegate Control…
  4. Next -> Add SP2013_Profiles (Created in in previous post) Click next.
  5. Select create a custom task to delegate. Click next.
  6. Select This folder, existing objects in this folder and creation of new objects in this folder. Click next.
  7. Select replicating directory changes:
    ad delegation replicating directory changes
    Click next, finish.

Configure DNS

Prepare app domain

Login to your domain controller machine. (created as virtual server Zummi in previous post) Apps in SharePoint 2013 are running in a different domain. Hence we need to setup that domain in the DNS Manager. Right click Forward Lookup Zones. Go through the wizard excpet where to enter your domain name: (or whatever name you would like to use). dns manager sharepoint app domain

Right click your newly created domain. Select new alias (CNAME). Fill in properties as shown below:

dns manager sharepoint app domain


Add web application(s) DNS a records

To properly be able to access your web application with alternate access mappings and to later on configure kerberos add A records for your web applications (portal and mysites – will be configured in AutoSPInstaller later) by right click your domain ( –> Add A record:

dns manager add portal


When done the configuration should look as below:

dns manager a records

Disable UAC and IE Enhanced protection

Login to your SharePoint server machine. (created as virtual server Grammi in previous post). In Server Manager –> Local Server disable IE enhanced protection:


In User Account Control Settings disable UAC:

disable uac

Download and prepare sources

Login to your SharePoint machine using a domain account. In this tutorial I login as domain administrator. For a production environment it would be recommended to use an installation account. For more information on SharePoint user accounts and requirements see: or google for more information. Before you can use AutoSPinstaller you nee to prepare it with the base installation of SharePoint 2013 and prerequisites. For offline installation you might also want to complement it with installation files from the Windows installation media. Follow the steps below to do this:

  1. Create a working directory for AutoSPInstaller and AutoSPSourceBuilder for example: C:\AutoSP.
  2. Download AutoSPInstaller from and extract the zip file into C:\AutoSP\
  3. Download AutoSPSourceBuilder from and extract the zip file into C:\AutoSP\
  4. Since we use Service Pack 1 of SharePoint 2013 we do not want any of the older cumulative updates that exists in AutoSPSourceBuilder (version Apr 28, 2014) comment out the following lines in AutoSPSourceBuilder.xml:
  5. Open up PowerShell as administrator. If you have not run any PowerShell scripts before you might need to change your execution policy to allow scripts by typing the following command:
    Set-ExecutionPolicy unrestricted

    Note: For a production environment or if you have any security concerns you might want to change your execution policy back to restricted or other policy. Read more at:

  6. Mount your SharePoint media. (G: in this case)
  7. Cd to the AutoSPSourceBuilder directory and run the script:
    cd C:\AutoSP\AutoSPSourceBuilder
    .\AutoSPSourceBuilder.ps1 -SourceLocation "G:" -Destination "C:\AutoSP\AutoSPInstaller\SP\2013\SharePoint" -GetPrerequisites $true

    Note: Since we commented out the cumulative update section before we will get an error message – ignore this, the script will continue.

  8. Mount your Windows 2012 R2 media. (G: in this case)
  9. Copy the contents from G:\sources\sxs to C:\AutoSP\AutoSPInstaller\SP\2013\SharePoint\PrerequisiteInstallerFiles\sxs
    This will make any additional features that might be needed for offline installation available to the prerequisite installer.

Configure AutoSPInstaller for installation

AutoSPInstaller uses an XML file to install and configure your SharePoint installation. If you have followed the tutorial you will have the file at C:\AutoSP\SP\AutoSPInstaller\AutoSPInstallerInput.xml.

The default AutoSPInstaller.xml is quite well structured with comments. Use a XML texteditor of your choice to edit the file. Or download, review and use the AutoSPInstaller.xml used in this tutorial.

If you like you can also use AutoSPInstallerGUI which is a graphical tool to help you administer the AutoSPInstaller.xml file. Follow the images below for using AutoSPInstallerGUI.

Note: If you get tthe following issue with AutoSPInstallerGUI:

net 35 error


Then run the following command (where source is the sxs directory from Windows 2012 R2 installation media as you prepared earlier):

dism /online /enable-feature /featurename:NetFX3 /all /Source:C:\AutoSP\SP\2013\SharePoint\PrerequisiteInstallerFiles\sxs /LimitAccess

Install tab

AutoSPInstallerGUI Install Tab

 Farm tab

AutoSPInstallerGUI Farm Tab

AutoSPInstallerGUI Farm-Services Tab

Web applications tab

AutoSPInstallerGUI WebApplications Tab

Service Applications tab

AutoSPInstallerGUI ServiceApplications-Search-SearchServiceApplication Tab

The settings not shown above are left as is by default. If you go with AutoSPInstallerGUI do NOT forget to check all the dropdown menus of service accounts, web applications etc. I would recommend that you open the AutoSPInstaller.xml in an texteditor and search for contoso/gummis to ensure that you have configured all url’s and service accounts.

Install SharePoint 2013 SP1 using AutoSPInstaller

In the virtual machine menubar: File –> Take Snapshot. (If anything goes wrong with the installation it will be easy to revert it to its previous state)

Run C:\AutoSP\SP\AutoSPInstaller\AutoSPInstaller.bat as administrator to start the installation.

The installer will make a few tests with user account verification etc. The installation might restart the computer when installing new features/configurations. This is normal. If there is any error you can go back to your AutoSPInstaller.xml and fix it and then re-run the installation script. It will check which steps that are completed and then continue where it stopped last time.

Tip! If the installation stops at some step and take unusual long time click in the powershell window and press enter. (It seems to wait for a keypress at sometimes).

When the script is ready you will hopefully see the mysites and portal site in front of you:

sharepoint almost ready

Configure user profile service application

Open Central Administration –> Application Management –> Manage Service Applications

Open User Profile Service Application –> Configure Synchronization Connections –> Create New Connection:

SharePoint 2013 User Profile Sync Connection

Go back to User Profile Service Application –> Click Start and see that it is working:

SharePoint 2013 User Profile Sync Status

Optimize SharePoint 2013 for development

If you are low on resources on your development machine you might want to adjust some performance settings such as cache size, search service memory usage, database logging etc. to improve performance. Note that this can cause problems and should not be used in a production environment as is. Below are some PowerShell scripts that you can adjust to fit your needs:

# Set search performance level to reduced
Set-SPEnterpriseSearchService -PerformanceLevel Reduced
# Set noderunner memory limit to 50mb
$nrFile = "C:\Program Files\Microsoft Office Servers\15.0\Search\Runtime\1.0\noderunner.exe.config"
$nrConfig = New-Object XML
$nrConfig.configuration.nodeRunnerSettings.memoryLimitMegabytes = "50"
# Set distributed cache to 500 (default is 10% of RAM)
$cacheService ="SPDistributedCacheService Name=AppFabricCachingService"
$cacheServiceInstance = Get-SPcacheServiceInstance | ? {($_.service.tostring()) -eq $cacheService -and ($ -eq $env:computername}
Set-CacheHostConfig -Hostname localhost -cacheport 22233 -cachesize 500 | Out-Null
# Set SP databases in simple recovery mode (less logging and less recovery possibilities)
$srv = "localhost"
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO") | out-null
$msmServer = New-Object ('Microsoft.SqlServer.Management.Smo.Server') -argumentlist $srv
$msmServer.Databases | where {$_.IsSystemObject -eq $false} | foreach {$_.RecoveryModel = [Microsoft.SqlServer.Management.Smo.RecoveryModel]::Simple; $_.Alter()}
$msmServer.Configuration.MaxServerMemory.ConfigValue = 1500


Leave a Reply