If you are following me on twitter (@stephanevg) you probably saw one of my tweets passing by saying I was working on Sharepoint, or anything else Sharepoint related.
I have to admit, I am pretty new to Sharepoint, but I am not to PowerShell. And let me tell you one thing, Sharepoint is a whole new universe for Powershell Scripters like us. As I have mentioned in several of my other posts, having the PowerShell knowledge brings you actually from project to project, jumpy from one technology to another (That’s basically what a System engineer does), but for me, there is always this common ground: Windows PowerShell.
I actually worked “A LOT” on SharePoint these last months, and I think I have mastered a good amount of the basics in order to start to share my knowledge here on PowerShellDistrict. For that, I decided to create a Sharepoint 2013 sp1 farm in my lab using AutoSpInstaller.
For the ones that do not know what AutoSPInstaller is, it is a set of PowerShell scripts that will guide through not only the installation, but also the configuration of your entire server farm! Yes, that is quite some neat stuff!
I also decided to blog about Sharepoint 2013 sp1 installation with AutoSpInstaller because I felt something was missing after the blog post I wrote explaining how you can build a complete System Center 2012 lab in minutes using PDT.
In the next coming weeks, I will talk pretty intesevily about PowerShell and Sharepoint (2013/2010). And in my opinion, the best way to to become good at something, is by trying things out, without beeing scared to break anything. That’s why the installation of a Sharpoint 2013 sp1 farm in my lab was crucial.
I am sharing in this post the method I used (and some other ones exisisting) on the Installation of Sharepoint 2013. The best solution in my opinion is the AutoSPInstaller, on which I will focus this blog post on.
The process is actually quite short and easy (even though this blog post seems a bit long), hang on, follow me, and you will have your lab installed in no time!
- 1) Infrastructure prerequisites
- 2)Sharepoint PreRequisites
- 3) Download and configure AutoSPInstaller
- 4) Install Sharepoint using AutoSPInstaller
Sharepoint 2013 SP1 global infrastructure prerequisites
Sharepoint 2013 SP1 Service accounts
There is a number of service accounts that needs to be created if you want to do the things right, and the installation of your Sharepoint 2013 farm to succeed. The number and their names will vary according to your Sharepoint 2013 farm size and features that you decide to install on.
THis has nothing to do with AutoSPInstaller, but I noticed that the services always needed to be created manually. I have written a short script that will use a CSV file as input parameter and create the Service accounts into Active Directory in a Bulk. Simply edit the CSV file and change the password (And add or remove Users from it), and call the script.
The script can be on downloaded on Technet here.
Sharepoint 2013 SP1 DNS records
There is another thing that is not handled by AutoSPInstaller, and that you need to do manually: Creating the DNS records for your Sharepoint 2013 Farm.
I have written another small basic script that would create the different A records that are needed for the Sharepoint 2013 farm. Similar to the script for the service accounts, it reads out a CSV configuration file that will contain your Wep application URL’s, and create the appropriate DNS records.
The script can be download on technet here.
Sharepoint 2013 SP1 SQL prerequisites
Of course, Sharepoint needs SQL to be installed. The installation of SQL is not handle by the AutoSPInstaller script. I have underlined here how I installed my SQL server for my lab.
The installation is very simple If compared to the SQL installation for Configuration manager 2012R2) and there needs only a very little of configuration.
What you need at the end is the following:
- Database Engine Services
- Management Tools Basic and Complete
And create a Named Instance (In my case I called it “Sharepoint”).
If you were wondering why some features were grayed out, it is because I took the screenshot once the installation was finished. My SQL server is also shared with other components of the System Center Family. That is why you can see other features installed on the screen shot that are grayed out and that I didn’t mention in the above bullet points, which do not need to be present for Sharepoint 2013.
I have put a copy of the INI file that resulted of the installation of my SQL server for my Sharepoint 2013 sp1 farm.
;SQL Server 2012 Configuration File
; Specifies a Setup work flow, like INSTALL, UNINSTALL, or UPGRADE. This is a required parameter.
; Detailed help for command line argument ENU has not been defined yet.
; Parameter that controls the user interface behavior. Valid values are Normal for the full UI,AutoAdvance for a simplied UI, and EnableUIOnServerCore for bypassing Server Core setup GUI block.
; Setup will not display any user interface.
; Setup will display progress only, without any user interaction.
; Specify whether SQL Server Setup should discover and include product updates. The valid values are True and False or 1 and 0. By default SQL Server Setup will include updates that are found.
; Specifies features to install, uninstall, or upgrade. The list of top-level features include SQL, AS, RS, IS, MDS, and Tools. The SQL feature will install the Database Engine, Replication, Full-Text, and Data Quality Services (DQS) server. The Tools feature will install Management Tools, Books online components, SQL Server Data Tools, and other shared components.
; Specify the location where SQL Server Setup will obtain product updates. The valid values are "MU" to search Microsoft Update, a valid folder path, a relative path such as .\MyUpdates or a UNC share. By default SQL Server Setup will search Microsoft Update or a Windows Update service through the Window Server Update Services.
; Displays the command line parameters usage
; Specifies that the detailed Setup log should be piped to the console.
; Specifies that Setup should install into WOW64. This command line argument is not supported on an IA64 or a 32-bit system.
; Specify the root installation directory for shared components. This directory remains unchanged after shared components are already installed.
INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL Server"
; Specify the root installation directory for the WOW64 shared components. This directory remains unchanged after WOW64 shared components are already installed.
INSTALLSHAREDWOWDIR="C:\Program Files (x86)\Microsoft SQL Server"
; Specify a default or named instance. MSSQLSERVER is the default instance for non-Express editions and SQLExpress for Express editions. This parameter is required when installing the SQL Server Database Engine (SQL), Analysis Services (AS), or Reporting Services (RS).
; Specify the Instance ID for the SQL Server features you have specified. SQL Server directory structure, registry structure, and service names will incorporate the instance ID of the SQL Server instance.
; Specify that SQL Server feature usage data can be collected and sent to Microsoft. Specify 1 or True to enable and 0 or False to disable this feature.
; Specify if errors can be reported to Microsoft to improve future SQL Server releases. Specify 1 or True to enable and 0 or False to disable this feature.
; Specify the installation directory.
INSTANCEDIR="C:\Program Files\Microsoft SQL Server"
; Agent account name
; Auto-start service after installation.
; CM brick TCP communication port
; How matrix will use private networks
; How inter brick communication will be protected
; TCP port used by the CM brick
; Startup type for the SQL Server service.
; Level to enable FILESTREAM feature at (0, 1, 2 or 3).
; Set to "1" to enable RANU for SQL Server Express.
; Specifies a Windows collation or an SQL collation to use for the Database Engine.
; Account for SQL Server service: Domain\User or system account.
; Windows account(s) to provision as SQL Server system administrators.
; The default is Windows Authentication. Use "SQL" for Mixed Mode Authentication.
; Provision current user as a Database Engine system administrator for SQL Server 2012 Express.
; Specify 0 to disable or 1 to enable the TCP/IP protocol.
; Specify 0 to disable or 1 to enable the Named Pipes protocol.
; Startup type for Browser Service.
Download Sharepoint 2013 SP1 prerequistes (For offline Installations)
There are several ways to do this automatically. When I was building my own lab, I noticed that each of these methods has his own drawbacks.
There are two ways: The AutoSPSourceBuilder , and set of PowerShell Scripts. Both of them didn’t really worked flawlessly while I was building my lab, but hang on, and i’ll guide you through the little steps you need to do to fix this.
In both cases, all the prerequisites that have been downloaded, will need to go in to the prerequisiteinstallerfiles folder of your SharePoint 2013 source folder (…\AutoSpInstaller\2013\Sharepoint\prerequisiteinstallerfiles ).
Download Sharepoint 2013 Prerequisites using AutoSPSourceBuilder (Recommended way)
The autoSPSourceBuilder will do all the hard work for you. It will download all the prerequisites, and even download Sharepoint 2013 for you. It will prepare everything for you, so you are ready and set to kick off the the automated installation using AutoSPInstaller. Get it from CodePlex right here.
One thing to keep in mind, and as it is highlighted on their main page, the AutoSPInstaller downloads the sources of Sharepoint 2013, and not Sharepoint 2013 SP1. If you need to install Sharepoint 2013 SP1, then you will have to download them yourself from MSDN.
Download Sharepoint 2013 Prerequisites using the Set of powershell Scripts
The set of PowerShell Scripts I am talking about have been written by Craig Lussier and can be downloaded directly from this download link.
The script is a bit old, and will use BITS in order to download one by one the Sharepoint 2013 prerequisites. What is also handy, is that it contains a scripts for the Windows Server 2012 roles prerequisites.
Download and install Sharepoint 2013 SP1 prerequistes Manually (For offline Installations)
Sharepoint 2013 Prerequisites – Windows 2012 R2 Roles and features
Listed here under, is the complete list of Windows Features and Roles that need to be installed on Windows Server 2012 R2. The list can be directly copy pasted into PowerShell and used in conjunction of Install-WindowsFeature:
Download Sharepoint 2013 Prerequisites manually
In case you need only one of the prerequisites (or for one of reason or another, you want to download them manually), I have put all the download links right here.
Windows Identity Extensions:http://download.microsoft.com/download/0/1/D/01D06854-CA0C-46F1-ADBA-EBF86010DCC6/r2/MicrosoftIdentityExtensions-64.msi
SQL Server 2008 R2 SP1 Native Client:http://download.microsoft.com/download/9/1/3/9138773A-505D-43E2-AC08-9A77E1E0490B/1033/x64/sqlncli.msi
Microsoft Information Protection and Control Client (MSIPC):http://download.microsoft.com/download/9/1/D/91DA8796-BE1D-46AF-8489-663AB7811517/setup_msipc_x64.msi
Microsoft WCF Data Services 5.0:http://download.microsoft.com/download/8/F/9/8F93DBBD-896B-4760-AC81-646F61363A6D/WcfDataServices.exe
Microsoft WCF Data Services 5.6 (rename the file WcfDataServices56.exe to WcfDataServices56.exe):http://download.microsoft.com/download/1/C/A/1CAA41C7-88B9-42D6-9E11-3C655656DAB1/WcfDataServices.exe
Windows Identity Foundation (KB974405):http://download.microsoft.com/download/D/7/2/D72FD747-69B6-40B7-875B-C2B40A6B2BDD/Windows6.1-KB974405-x64.msu
Microsoft Sync Framework Runtime v1.0 SP1 (x64):http://download.microsoft.com/download/E/0/0/E0060D8F-2354-4871-9596-DC78538799CC/Synchronization.msi
Windows Server AppFabric:http://download.microsoft.com/download/A/6/7/A678AB47-496B-4907-B3D4-0A2D280A13C0/WindowsServerAppFabricSetup_x64.exe
CU 1 for AppFabric 1.1 (KB2671763):http://download.microsoft.com/download/7/B/5/7B51D8D1-20FD-4BF0-87C7-4714F5A1C313/AppFabric1.1-RTM-KB2671763-x64-ENU.exe
Install Sharepoint 2013 SP1 using AutoSpInstaller and AutoSPInstallerGUI
There is one magicall thing in the Sharepoint universe, which is called “AutoSPInstaller“. What is it? Basically, it a set of scripts that will automatically install, and configure you entiere Sharepoint 2010 or sharepoint 2013 farm. It is really a complete tool. The whole process relies on configuring one XML file (named by default AutoSPInstallerInput.xml) that will then be read by the script. The Script will validate that the configuration that is specified in the AutoSPInstallerInput.xml file is correct, and it will trigger the installation of your Sharepoint 2010 or Sharepiont 2013 farm and if specified, install you Web applications, first Site collections etc…
There is one big drawback about this solution, is the fact that as is, you will need to go into the AutoSPInstallerInput.xml file, and edit it directly. Luckly for us, there is AutoSPInstallerGUI, that actually put’s a GUI on top of the configuration of the AutoSPInstallerInput.xml and increases the user friendliness of the global solution.
Download the latest version of AutoSPInstaller from codeplex here.
How to install a Sharepoint 2013 sp1 farm using AutoSpInstaller GUI?
The AutoSPInstallerGUI is a blessing! It makes things SO MUCH EASIER to build a lab (or even to build productive environments!). When I decided to write this article, I noticed that the AutoSPInstallerGUI has ‘Evolved’ to a Online-only application. Basically, it would to the same thing as the local binaries one, help you configure your AutoSPInstallerInput.xml file, but online.
I have used the local one, in order to generate my Configuration File (Since that is the one I have always used), but the results is the same, no matter wich method you decide to use, it will simply generate a new AutoSPInstallerInput.xml file.
The original Download link for the AutoSpInstallerGUI on Codeplex is still available here (Click ‘Download’ button on the right).
The newer version of the AutoSPInstallerGUI (Read AutoSPInstaller Online) can be access here.
- I recommend you go through the Guide here before you start do anything, and if you are unfamiliar with AutoSPInstaller.
The XML files have versioning as well, which means that a ConfigFile that has been generated on the latest of the GUI (on premiss) will not be able to be uploaded to the Online Version…
My installation of Sharepoint 2013 sp1 using AutoSpInstaller
As I said before, I used the offline version of AutoSPInstaller in order to install my lab. I will use my lab installation a reference here and guide you through the complete installation process.
Input the information that relates to your information in the following points:
- Sharepoint Version
- insert the PID key (the installation won’t work without it!)
- Choose if you want to let the script auto login into the serve after the reboots.
Input the information that relates to your information in the following points:
- Farm Account username
- Farm Account Password
- DataBase Name
- DataBase Instance Name
- Enter each service account that you have created in the earlier step here (See bulk script above).
- (You can leave Services and Logging with their default values).
Input the information that relates to your information in the following points:
- AddUrl To hosts
- Type (Portal and mysites required).
- App Pool Name (Try to create one App Pool per Web Application).
- Port (Must be unique per Web Application)
- Content Database name
- Specify at least One Site collection per Web application (Not mandatory, but recommended).
- A mySite WebApplication is also required.
These steps are the minimum in order to make it work.
Voila! You can now save the XML file in the same folder as the AutoSpInstaller, and launch the AutoSPInstallerLaunch.bat as an Administrator in order to launch the installation.
In my lab, the installation took about 2h30 in total.
Another nice feature of AutoSpInstaller is that you can call it often as you want. It is indempotent, which means that if something is already installed with the same config, it won’t break it or modify it. So if doesn’t work from the first time. Read the log file (that opens up automatically), correct the error, and try again 🙂