Tuesday, April 6, 2010

SharePoint 2010 RC Unattended Installation

First of all you have to extract the installation file. In this case i used the following script to install 14.0.4730.1010_OfficeServer_none_ship_x64_en-us.exe.

14.0.4730.1010_OfficeServer_none_ship_x64_en-us.exe file /extract:C:\SP2010Install

After this it is necessary to create a config.xml file describing the binary installation process


<Package Id="sts">
<Setting Id="LAUNCHEDFROMSETUPSTS" Value="Yes"/>
<Package Id="spswfe">
<Setting Id="SETUPCALLED" Value="1"/>
<Logging Type="verbose" Path="%temp%" Template="SharePoint Server Setup(*).log"/>
<Display Level="none" CompletionNotice="no" />
<Setting Id="USINGUIINSTALLMODE" Value="0"/>
<Setting Id="SETUP_REBOOT" Value="Never" />

With this xml file and a small powershell script it is possible to complety install SharePoint 2010 without manual interaction


#Execute setup.exe with a xml to install SharePoint
& 'C:\SP2010Install\setup.exe' '/config' 'C:\2010CMD\spconfig.xml' | out-null
#Include the SharePoint cmdlets
Add-PsSnapin Microsoft.SharePoint.PowerShell
$database = "MOSS_Config_Farm"
$admindatabase = "MOSS_Content_CentralAdministration"
$sqlserver = "SA_MOSS"
$passphrase = (ConvertTo-SecureString "Passphrase111" -AsPlainText -force)
$username = "alegri\srvadmin"
$password = (ConvertTo-SecureString "password" -AsPlainText -force)
#Disable loopback check
New-ItemProperty HKLM:\System\CurrentControlSet\Control\Lsa -Name "DisableLoopbackCheck" -value "1" -PropertyType dword
#Create the credentials
$credentials = New-Object System.Management.Automation.PsCredential $username,$password
#Execute the config wizard
New-SPConfigurationDatabase -DatabaseName $database –AdministrationContentDatabaseName $admindatabase -DatabaseServer $sqlserver -Passphrase $passphrase -FarmCredentials $credentials
#Provision a Central Administration Site
New-SPCentralAdministration -Port 12000 -WindowsAuthProvider "NTLM"
#Install help files
Install-SPHelpCollection –All
#Secure Resources
#Install all exiting features
Install-SPFeature –AllExistingFeatures
#Provision services

For some help how to use pwershell please refer to


If you did no sign your powershell script you can check the execution policy with


To run unsigned scripts activate the command

Set-ExecutionPolicy Unrestricted

With Get-Help About_signing you can get on overview of the different execution policy settings

I used SQL 2008. In the installation process i got the following error message

New-SPConfigurationDatabase : SQL server at SA_MOSS has an unsupported version

10.0.2531.0. Please refer to "http://go.microsoft.com/fwlink/?LinkId=165761" for information on the minimum required SQL Server versions and how to download them.

At line:1 char:28

+ New-SPConfigurationDatabase <<<< -DatabaseName $sp_databasename -DatabaseServer $sp_databaseserver -Passphrase $sp_passphrase -FarmCredentials $sp_credentials

+ CategoryInfo : InvalidData: (Microsoft.Share...urationDatabase: SPCmdletNewSPConfigurationDatabase) [New-SPConfigurationDatabase], SPException

+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewSPConfigurationDatabase

A roll-up hotfix must be installed:


If you want to reinstall SharePoint (Trial) and get the following error message:

"Microsoft Office Server Trial Edition may not be installed on a server with licensed Microsoft Office Server products. Remove existing Microsoft Office Server products and re-run setup".

You have to delete the following registry keys:

HKLM\Software\Microsoft\Shared Tools\Web Server Extensions\14.0

HKLM\Software\Microsoft\Office Server

No comments: