Showing posts with label powershell. Show all posts
Showing posts with label powershell. Show all posts

Wednesday, May 14, 2014

Install and configure SharePoint 2013 Service Pack 1



The purpose of this document is to describe step by steps instructions that must be followed to consistently perform the installation and configuration of SharePoint Server 2013 SP1.


This includes the supporting servers and the servers that will have SharePoint 2013 installed. The following servers must be configured to support and host a farm:
·         Database server: The required version of SQL Server is SQL server 2012 enterprise version, including service pack 1 and cumulative updates must be installed during installation on the database server. The installation must include all features and administrative tools and packages. For additional information and guidance , see:

The data location should be set up on drive D or E as required.
·         Application servers and front-end Web servers: The farm servers that will have SharePoint 2013 installed must be prepared as follows: verify that they meet the hardware requirements, have the operating system updates. For additional information and guidance , see:
o    "Installing software prerequisites" in Hardware and software requirements for SharePoint 2013

Product Overview

SharePoint Server 2013 provides a comprehensive solution for connected information work that enables people to transform the way they work while preserving the benefits of structured processes, compliance, and existing IT investments.
SharePoint Server 2013 has been optimized for the way people work, providing people with a familiar, consistent view of information, collaboration, and process, and IT with a comprehensive, easily-managed and integrated platform to meet the needs of the business.

Product Inventory

Product Name
Windows Server 2012 R2
SharePoint 2013 Service Pack 1
SQL Server 2012 Service Pack 1
.Net Framework
3.5 and 4.5 (as part of windows installation)
Additional language packs may be downloaded and installed for SharePoint 2013.

User and Groups

Following service accounts are to be created in active directory with required complexity and password never expire. 

Account name
Account Description
This is Service account for User Profile synchronization
This is service account for Search service applications
This is service account for execute all SCA jobs
This is service account for Farm Configuration
This is Service account for Search content access
This is Service account for Web application pool account
This is Service account for all SharePoint service applications
This is service account for all interfaces
This is Service account for setup and owner of site collection

Turn off UAC settings for service accounts

·           Open User Account Control Settings by clicking the Start button Picture of the Start button, and then clicking Control Panel. In the search box, type UAC, and then click Change User Account Control settings.

·           To turn off UAC, move the slider to the Never notify position, and then click OK.  Administrator permission required if you're prompted for an administrator password or confirmation, type the password or provide confirmation. You will need to restart your computer for UAC to be turned off.

UAC settings should be turned off by installation script.

Add services accounts to local administrator

Service accounts to be added, FarmSVC and SetupSVC.

Open Server Manager. Click Tool in the right corner of Server Manager and then select Computer Management.

In the Computer Management windows, expand Local Users and Groups and select Groups. Double click on Administrators group.

In the Administrators Properties, click Add...In the Select Users, Computers, Service Accounts, or Groups windows, type the account you want to add to Local Administrator group and then click OK.

Click OK.

Add service accounts to SQL users and grant permissions

·         Add FarmSVC and SetupSVC service accounts to SQL using this technet article.
·         Grant dbcreator and securityadmin.
Note :- SQL should be installed with setup account.

 Installation and Configuration of SharePoint Server 2013

Prerequisites for Installation and Configuration

Before you begin to install and configure SharePoint 2013, do the following:

Ensure that you have met all hardware and software requirements. You must have a 64-bit version of Windows Server 2012 R2 SP1. For server farms, you must also have a supported 64-bit version of SQL Server. For more information about these requirements, such as specific updates that you must install, see Hardware and software requirements for SharePoint 2013.

Ensure that you perform a clean installation of SharePoint 2013.

Ensure that you are prepared to set up the required accounts by using appropriate permissions. For detailed information, see Initial deployment administrative and service accounts in SharePoint 2013.

Install Window server 2012 R2 Roles/Features

This script installs all of the necessary Windows Server 2012 R2 Roles/Features to prepare for a SharePoint 2013 installation. This script supports installing the Roles/Features 'Online' with an Internet connection and 'Offline' without an Internet connection, using Windows server 2012 media.

 Windows Server 2012 R2 Environment Assumptions:

This script assumes (and does not check) that the following Windows Server 2012 R2 Features are installed (they should installed be by default in Windows Server 2012 R2):
·                     .NET Framework 4.5 Features (NET-Framework-45-Features)
·                     .NET Framework 4.5 Features > .NET Framework 4.5 (NET-Framework-45-Core)
·                     Windows PowerShell (PowerShellRoot)-Windows PowerShell > Windows PowerShell 3.0 (PowerShell)

Are you installing the Roles/Features 'Online' or 'Offline'?

·           If your server is 'Online' and you use the PrerequisiteInstaller.exe (i.e. out of the box), it will execute a PowerShell script to install the necessary Roles/Features to configure Windows Server 2012 R2 for SharePoint 2013. Part of the (PowerShell) Add-WindowsFeature installation installs the NET-Framework-Core feature which is .NET 3.5. This installation requires binaries and other files that are not included by default in Windows Server 2012 R2. This requires Windows Update to download/install these files and an Internet connection.
·           You need to have SharePoint 2013 SP1 media to run preinstaller.exe to configure web and app roles for windows server 2012 R2.
·         Download .zip file containing my scripts and extract the .ps1 files to c:\powershellscripts (or another directory of your choosing)
·         Run PowerShell as Administrator (you can do this from the Start Screen - right click PowerShell and select "Run as Administrator"
·         Ensure you have set your PowerShell execution policy to Remote-Signed (you can change it later if you need to)
·         Run this script: 
o   When you run the script, it will prompt you to decide if you are installing the Roles/Features 'Online' or 'Offline'. If you select 'Online' your server must have an Internet Connection. In this case, Windows Update will be used to download then install binaries and other files related to the installation of .NET 3.5. If you select 'Offline', the script will prompt you for the location of your Windows Server 2012 R2 installation media. The binaries and other files required are included in this media. Enter the path (without a trailing slash) to the 'sources\sxs' folder (for example D:\sources\sxs) of your Windows Server 2012 R2 installation media. This can be a mounted ISO, a local drive or a UNC path. Using the 'Offline' method will install the Roles/Features faster than the 'Online' method. 
o   The script will prompt you to Reboot your server after the Roles/Features have installed. You can opt in or out, but I recommend that you opt in and reboot your server as you need to in order for the Windows Features to be configured correctly.

Download SharePoint 2013 prerequisites

This script downloads the ENGLISH versions of the required Prerequisite files for SharePoint 2013 on Windows Server 2012 R2. It stores them in a directory of your choosing.

·      Create a local directory where the script can save the SharePoint 2013 Pre-requisite downloads. For example, c:\sp2013downloads.
·      Run PowerShell as Administrator (you can do this from the Start Screen - right click PowerShell and select "Run as Administrator"
·      Run this script: 
·      You will be required to define a path where the script can save the downloaded files. (e.g. c:\sp2013downloads)

Install SharePoint 2013 prerequisites

This script utilizes the PrerequisiteInstaller.exe included in the SharePoint 2013 installation media to install the necessary prerequisites for SharePoint 2013 on Windows Server 2012 R2.
You have downloaded the SharePoint 2013 installation media from MSDN, TechNet or Volume Licensing/Software Assurance etc.

·         You have already executed Install-SP2013RolesFeatures.ps1 and rebooted your server
·         You have already executed Download-SP2013PreReqFiles.ps1
·         Copy the SharePoint 2013 installation media files into a local directory on you Windows Server 2012 R2 server. For example, c:\sp2013.
·         Copy the Prerequisite files into the c:\sp2013\prerequisiteinstallerfiles directory.
·         Run PowerShell as Administrator (you can do this from the Start Screen - right click PowerShell and select "Run as Administrator"
·         Run this script:
·         You will be required to define a path where to your SharePoint 2013 installation media. (e.g. c:\sp2013). Watch the Prerequisite installer tool install all of the prerequisites.
·         When the installer is complete, reboot your server prior to installing SharePoint 2013. You should now be able to run the SharePoint 2013 installer, bypassing the Pre-requisite step.

Installation and Configuration Procedure

Steps to configure and run AutoSPInstaller, a set of scripts that can be used to automatically install SharePoint.

By not having the original file present, we ensure that our environment specific file is loaded and forms a way of documenting the installation. You could also provide separate config.xml files with separate PIDs. To do this, rename the config.xml files and specify the new names in the AutoSPInstallerInput.xml file under the ConfigFile element.

Open the file and enter the SharePoint 2013 product key under the PIDKEY parameter. Once done, open the files in Internet Explorer to ensure they open without errors, i.e. that they contain well formed XML. Alternatively, use an XML editor.

Create following folders

Enter passphrase for SharePoint farm

Ensure that the passphrase meets the following criteria:
  • Contains at least eight characters
  • Contains at least three of the following four character groups:
    • English uppercase characters (from A through Z)
    • English lowercase characters (from a through z)
    • Numerals (from 0 through 9)
    • Non-alphabetic characters (such as !, $, #, %)

Add service accounts under required parameters in the AutoSPInstallerInput.xml file.

Add SQL Database Name

You can also create default site collection with required host header

Update app domain URL

Save AutoSPInstallerInput.xml

Run AutoSPInstallerLaunch.

Post Installation Activities

Configure environment for apps for SharePoint

Verify following DNS entries

DNS Name

Add certificates to IIS

Add following certificate to IIS using this article.

Certificate Name

Configure central certificate store for IIS

The CCS is based on a truly simple concept. Store all the certificates in a Windows File Server share, then have the Web site bindings use those instead of locally installed certificates. Not only does this reduce the chaos of installing certificates on multiple servers, it greatly reduces the management time and effort locating certificates that are about to expire.
Refer MSDN Article to configure CCS.
Export all certificate listed above to this CCS.

 Add a Website to host SharePoint Apps on App server

This step tells you how to add a website to IIS by using the IIS Manager UI, or by running Appcmd.exe commands in a command-line window.

Open IIS Manager.

For Windows Server 2012 R2, on the Start page click the Server Manager tile, and then click OK. In the Server Manager, click the Tools menu, and then click Internet Information Services (IIS) Manager.

In the Connections pane, right-click the Sites node in the tree, and then click Add Website.

In the Add Website dialog box, enter name SCA SharePoint Apps for your website in the Site name box.

If you want to select a different application pool than the one listed in the Application Pool box, click Select. In the Select Application Pool dialog box, select an application pool from the Application Pool list and then click OK.

In the Physical path box, enter the physical path of the website's folder, or click the browse button (...) to navigate the file system to find the folder.

Select the protocol for the website from the Type list, Select HTTPS.

Enter a port number 443 in the Port text box.

Enter a host header name MySiteCollection for the website in the Host Header box.

If you do not have to make any changes to the site, and you want the website to be immediately available, select the Start Web site immediately check box.

Click OK.