SharePoint 2010 server installation
It took a while but here is part 3 of these series about a complete PowerShell scripted SharePoint 2010 installation.
I used the script you see below. It maybe is not the nicest PS script to do this installation. On the internet I have found scripts with error handling and checking every step of the script but I wanted to find out myself and this is the result.
# Execute setup.exe with the setupfarmsilent xml to install SharePoint
Write-Host “Installing SharePoint 2010 Quietly”
& ‘C:\install\sp2010i\setup.exe’ ‘/config’ ‘C:\install\config.xml’ | out-null
# Include the SharePoint cmdlets
Write-Host “Loading SharePoint 2010 PowerShell cmdlets”
Add-PsSnapin Microsoft.SharePoint.PowerShell
# Set the farm variables
Write-Host “Setting SharePoint 2010 Farm variables”
$sp_cfdatabasename = “SP2010_Config”
$sp_cadatabasename = “SP2010_Admin_Content”
$sp_databaseserver = “DEVNET-R2″
$sp_passphrase = (ConvertTo-SecureString “ThisIsThePassphrase!” -AsPlainText -force)
$sp_password = (ConvertTo-SecureString “xxxxxxxx” -AsPlainText -force)
$sp_username = “DEVNET\xxxxxxx”
# Clean up the credentials
$sp_credentials = New-Object System.Management.Automation.PsCredential $sp_username,$sp_password
# Execute the config wizard
Write-Host “Add configuration and administration databases”
New-SPConfigurationDatabase -DatabaseName $sp_cfdatabasename -DatabaseServer $sp_databaseserver –AdministrationContentDatabaseName $sp_cadatabasename -Passphrase $sp_passphrase -FarmCredentials $sp_credentials
# Provision a Central Administration Site
Write-Host “Add Central Administration”
New-SPCentralAdministration -Port 11111 -WindowsAuthProvider “NTLM”
# Install all of the help files within Central Admin
Write-Host “Installation of Help files”
Install-SPApplicationContent
# Secure the files and registry entries on the server
Write-Host “Resource security”
Initialize-SPResourceSecurity
# to install the features on the server.
Write-Host “Installation of features”
Install-SPFeature –AllExistingFeatures
# to install and and then provision the services onto the farm.
Install-SPService
# Disable the loopback check, run this command from PowerShell.
Write-Host “DisableLoopbackCheck registry key”
New-ItemProperty HKLM:\System\CurrentControlSet\Control\Lsa -Name “DisableLoopbackCheck” -value “1″ -PropertyType dword
Write-Host “Installation script is ready”
If you have any questions feel free to ask. My next post will have scripts for configuring a web application and a site collection.
Part 2: SharePoint 2010 prerequisites
Part 3: SharePoint 2010 server installation
Tags: beta, installation, powershell, SP2010




June 9th, 2010 at 8:58 AM
Great site. A lot of useful information here. I’m sending it to some friends!
July 15th, 2010 at 3:39 AM
Pretty nice post. I just stumbled upon your blog and wanted to say that I have really enjoyed browsing your blog posts. In any case I’ll be subscribing to your feed and I hope you write again soon!