Yet another SharePoint 2010 Deployment Script

Anthony de Lagarde delagardecodeplex@hotmail.com

Introduction

The following PowerShell script is intended to help operations staff as well as developers to automate the base install of SharePoint 2010 Server with Service Pack 1 on Windows Server if they do not have a standardized deployment tool in their environment.

The script will perform the following actions:

  • §  Format the two drives D:\ and E:\ as part of the overall SharePoint 2010 install.
  • §  Modify the CDROM drive to X:\
  • §  Create specific folders.
  • §  Install the SharePoint 2010 prerequisites.
  • §  Deploy SharePoint 2010 with Service Pack 1 slipstreamed.
  • §  Install the Adobe PDF IFilter.
  • §  Register the PDF extension in the registry, update the DOCICON.XML file for search, and add the Adobe PDF Image to the 14 hive.
  • §  Optionally install the SMTP or Network Load Balancer component by the System Operator.
  • §  Add a dedicated install account to the local administrators group of the Windows Server.
  • §  Enable firewall logging through the use of netsh.
  • §  Will disable the loopback check in the registry to browse SharePoint sites locally.
  • §  Will add an Active Directory based account such as SPADMIN to the local administrators group.

Requirements

SQL Native Client

Hotfix for Microsoft Windows (KB976462) – NET 3.5 SP1 HotFix

Windows Identity Foundation (KB974405) for Windows 2008 R2

Microsoft Sync Framework Runtime v1.0 (x64)

Microsoft Chart Controls for Microsoft .NET Framework 3.5

Microsoft Filter Pack 2.0

Microsoft SQL Server 2008 Analysis Services ADOMD.NET

Microsoft Server Speech Recognition Language - TELE(en-US)

SQL 2008 R2 Reporting Services SharePoint 2010 Add-in

 

  • §  SharePoint Prerequsiteinstaller.txt (PrerequisiteInstaller.Arguments.txt)
  • §  Adobe PDF IFilter 9.0 64 bit installation file
  • §  Adobe PDF Image (Save the image and call it pdficon_small.gif)
  • §  Windows Server 2008 R2 with Service Pack 1 (8 GB of memory).
  • §  C:\ System Drive 120 GB in size.
  • §  Second unformatted drive (20 GB)
  • §  Third unformatted drive (80 GB)
  • §  An assigned Windows account for the installation of SharePoint 2010.
  • §  A Windows Active Directory domain (preferred).
  • §  Custom config.xml file to install SharePoint 2010.

Instructions

  1. Install a system with Windows Server 2008 R2 with Service Pack 1 and two additional unformatted drives per the requirements previously outlined.
  2. Join the system to your Active Directory domain.
  3. Create a folder C:\Temp.
  4. Open an Administrative Command prompt and type PowerShell and hit enter.
  5. In the same administrative command prompt type the following command:

set-executionpolicy unrestricted.

  1. Type the following command get-executionpolicy and hit enter the output should be unrestricted.
  2. Create a folder called SP2010SP1 inside C:\Temp.
  3. Copy the contents of the SharePoint 2010 CD software bits into the SP2010SP1 folder.
  4. Create a folder called PDF inside the SP2010SP1 folder and place both the Adobe GIF file and the Adobe PDF IFilter 9.0 64 bit installation file in it.

  5. The folder structure should look like this:
    C:\Temp
    C:\Temp\SP2010SP1
    C:\Temp\SP2010SP1\PDF


  6. Copy the SharePoint 2010 Prerequisite files and place them inside C:\Temp\SP2010SP1\Updates folder.
  7. Open Notepad and save the file with the following name “PrerequisiteInstaller.Arguments.txt” saving it inside of C:\Temp\SP2010SP1.
  8. Inside that file enter the following information:

/SQLNCli:"Z:\Applications\SP2010SP1\PrerequisiteInstallerFiles\sqlncli.msi" /ChartControl:"Z:\Applications\SP2010SP1\PrerequisiteInstallerFiles\MSChart.exe" /IDFXR2:"Z:\Applications\SP2010SP1\PrerequisiteInstallerFiles\Windows6.1-KB974405-x64.msu" /Sync:"Z:\Applications\SP2010SP1\PrerequisiteInstallerFiles\Synchronization.msi" /FilterPack:"Z:\Applications\SP2010SP1\PrerequisiteInstallerFiles\filterpack\FilterPack.msi" /ADOMD:"Z:\Applications\SP2010SP1\PrerequisiteInstallerFiles\SQLSERVER2008_ASADOMD10.msi" /Speech:"Z:\Applications\SP2010SP1\PrerequisiteInstallerFiles\SpeechPlatformRuntime.msi" /SpeechLPK:"Z:\Applications\SP2010SP1\PrerequisiteInstallerFiles\MSSpeech_SR_en-US_TELE.msi" /ReportingServices:"Z:\Applications\SP2010SP1\PrerequisiteInstallerFiles\rsSharePoint.msi"

SPECIAL NOTE: The command line arguments are on one long line and not wrapped. Please refer to the following article from Microsoft for guidance: http://technet.microsoft.com/en-us/library/ff686793.aspx

  1. Copy the SharePoint 2010 Foundation Service Pack 1 and SharePoint 2010 Service Pack 1 files to C:\Temp of your system.
  2. Open another Administrative Command Prompt on your system and change to C:\Temp where you have the SharePoint Foundation 2010 Service Pack 1 and SharePoint 2010 Server Service Pack 1 files located.
  3. Type the following command: sharepointfoundation2010sp1-kb2460058-x64-fullfile-en-us.exe /extract:C:\Temp\SP2010SP1\Updates.
  4. Put a check mark next to Click here to accept the Microsoft Software License Terms and hit Continue. The contents of the service pack will begin to extract.
  5. When the extraction completes run the following command against the SharePoint 2010 Server Service Pack 1 file: officeserver2010sp1-kb2460045-x64-fullfile-en-us.exe /extract:C:\Temp\SP2010SP1\Updates from within the same command prompt.
  6. Create a config.xml answer file for the deployment of SharePoint 2010 and enter the following information below:
    You can edit a file located in C:\Temp\SP2010SP1\Files\SetupFarm\config.xml to make it look like the configuration below. Refer to TechNet for greater guidance here on how to customize the config.xml: http://technet.microsoft.com/en-us/library/cc261668.aspx#Customizing

<Configuration>

<Package Id="sts">

<Setting Id="SETUPTYPE" Value="CLEAN_INSTALL"/>    

</Package>

<Logging Type="verbose" Path="%temp%" Template="Microsoft SharePoint Foundation 2010 Setup *.log"/>

<PIDKEY Value="ENTER A VALID PRODUCT KEY HERE" />

<Setting Id="SERVERROLE" Value="APPLICATION"/>

<Setting Id="UsingUIInstallMode" Value="1"/>

<Setting Id="SETUP_REBOOT" Value="Never" />

<INSTALLLOCATION Value="D:\Program Files\Microsoft SharePoint" />

<DATADIR Value="E:\INDEX" />

<Display Level="Basic" CompletionNotice="No" AcceptEULA="Yes" />

</Configuration>

  1. Save the file as serverconfig.xml and place it in C:\Temp\SP2010SP1.
  2. Copy the SharePoint2010Deployment.ps1 script in C:\Temp.
  3. Open an Administrative Command prompt and type PowerShell.
  4. Type the following command: C:\Temp\ SharePoint2010Deployment.ps1 and hit enter.

The Script will first determine if the OS is Windows Server 2008 R2. If the OS is another such Windows Server 2008 or Windows Server 2003 R2 the script will halt. The script will also determine if SharePoint 2010 was previously installed on the system. If the script detects a previous SharePoint 2010 installation it will give a warning and stop.

The script will format the two unformatted drives using diskpart. You will see two dialogue Windows asking to confirm the format of the drives ignore them and do not close them!

Follow the prompts of the script on the screen.

When the SharePoint installation completes make sure to uncheck the Configuration Wizard and click close on the SharePoint setup screen.

Follow the prompts of the script on the screen.

 

Last edited Nov 13, 2012 at 1:28 AM by delagardecodeplex, version 1

Comments

No comments yet.