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.

  • Share/Save/Bookmark

Tags: , , ,

Free wordpress themes | Drupal themes | Joomla templates | Free mediawiki themes | Free pligg themes | Web templates" | Customizable Website Templates |

3 Responses to “SharePoint 2010 scripted install with powershell part 3”

  1. Great site. A lot of useful information here. I’m sending it to some friends!

  2. 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!

Trackbacks/Pingbacks

  1. Tweets die vermelden SharePoint 2010 scripted install with powershell part 3 -- Topsy.com

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>