Remotely test SharePoint 2010 software prerequisites


Hi,

Most of you know the long and pretty complicated list of SharePoint 2010 prerequisites. To help having them in place, we have the PrerequisiteInstaller.exe program.

But what if you want to test they are present … on a remote server using a remote Windows PowerShell session?

I just finished this tricky exercise, and here’s what you may want to run to test these.

Please note I don’t test Windows Features and IIS specific instructions to register ASP .Net with this script.

Improve, adapt and enjoy

< Emmanuel />

 

Windows PowerShell script (also attached to the post):

$password = convertTo-secureString -string Password -asPlainText -force

$cred = new-object System.Management.automation.Pscredential (“SP14\Administrator”, $password)

$session = New-PSSession -computername SP14 -Authentication CredSSP -Credential $cred

 

$PreReqError = $null

if ($session.State -eq “Opened”) {

 

# Test SQL Server 2008 Native Client

$Test = invoke-command -session $session -scriptblock {Get-ItemProperty “HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\SQLNCLI10\CurrentVersion”}

if (!($Test.Version -eq “10.0.1600.22”)) {$PreReqError = “Error with SQL Server 2008 Native Client Prerequisite”}

 

# Test Hotfix KB976462

$Test1 = invoke-command -session $session -scriptblock {Get-Item “C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\System.IdentityModel.dll”}

$Test2 = invoke-command -session $session -scriptblock {Get-Item “C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\System.ServiceModel.dll”}

if (!($Test1.VersionInfo.Contains(“3.0.4506.5000”) -and $Test2.VersionInfo.Contains(“3.0.4506.5000”))) {$PreReqError += “Error with Hotfix KB976462 Prerequisite”}

 

# Test Windows Identity Foundation (KB974405)

$Test = invoke-command -session $session -scriptblock {Get-ItemProperty ‘HKLM:\software\microsoft\Windows Identity Foundation\Setup\v3.5’ }

if (!($Test.SP -eq “0”)) {$PreReqError += “Error with Windows Identity Foundation (KB974405) Prerequisite”}

 

# Test Sync Framework Runtime v1.0 (x64)

$Test = invoke-command -session $session -scriptblock {Get-Item ‘C:\Windows\assembly\GAC_MSIL\Microsoft.Synchronization\1.0.0.0__89845dcd8080cc91\Microsoft.Synchronization.dll’ }

if (!($Test.VersionInfo.Contains(“1.0.1215.0”))) {$PreReqError += “Error with Sync Framework Runtime v1.0 (x64) Prerequisite”}

 

# Test Chart Controls for .NET Framework 3.5

$Test = invoke-command -session $session -scriptblock {Get-ItemProperty ‘HKLM:\SOFTWARE\Wow6432Node\Microsoft\NET Framework Chart Setup\NDP\v3.5’ }

if (!($Test.Version -eq “3.5.0.0”)) {$PreReqError += “Error with Sync Framework Runtime v1.0 (x64) Prerequisite”}

 

# Test MS Filter Pack 2.0

$Test = invoke-command -session $session -scriptblock {Get-ItemProperty ‘HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{95140000-2000-0409-1000-0000000FF1CE}’ }

if (!($Test.DisplayVersion -eq “14.0.4763.1000”)) {$PreReqError += “Error with MS Filter Pack 2.0 Prerequisite”}

 

# Test SQL Server 2008 AS ADOMD.NET

$Test = invoke-command -session $session -scriptblock {Get-ItemProperty ‘HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{68442820-C846-4E8A-8D53-EDEDD1511CDE}’ }

if (!($Test.DisplayVersion -eq “10.1.2531.0”)) {$PreReqError += “Error with SQL Server 2008 AS ADOMD.NET Prerequisite”}

 

# Test Speech Platform Runtime (x64)

$Test = invoke-command -session $session -scriptblock {Get-Item ‘HKLM:\SOFTWARE\Classes\Wow6432Node\TypeLib\{D3C4A7F2-7D27-4332-B41F-593D71E16DB1}\A.0\0\win64’ }

if (!($Test.PSIsContainer)) {$PreReqError += “Error with Speech Platform Runtime (x64) Prerequisite”}

 

# Test Server Speech Recognition Language – TELE(en-US)

$Test = invoke-command -session $session -scriptblock {Get-Item ‘HKLM:\SOFTWARE\Microsoft\Speech Server\v10.0\Recognizers\Tokens\SR_MS_en-US_TELE_10.0’ }

if (!($Test.PSIsContainer)) {$PreReqError += “Error with Server Speech Recognition Language – TELE(en-US) Prerequisite”}

 

# Test SQL 2008 R2 RS SharePoint 2010 Add-in

$Test = invoke-command -session $session -scriptblock {Get-ItemProperty ‘HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\Report Server SharePoint Addin\CurrentVersion’ }

if (!($Test.Version -eq “10.50.1600.1”)) {$PreReqError += “Error with SQL 2008 R2 RS SharePoint 2010 Add-in Prerequisite”}

 

if (!$PreReqError) {$TestAddinsResult = “Success”}

 

Remove-PSSession -Session $session}

TestSP14SoftAddinsPrerequisites.ps1.txt

Comments (2)

  1. Joe says:

    I've found that checking for WIF in the manner described here fails on a Windows 2008 (non-R2) system; it seems as the the v3.5 key is not visible. Has anyone seen this and is there another approach for checking for existence of WIF?

  2. Joe says:

    My last posting should have said "fails on Windows 2008 x86 (non-R2)" – the key is detected on x64; and this does not appear to be related to looking in the Wow6432Node