Skip to content

Commit 4c9ff6f

Browse files
committed
Merged xSPInstallPrereqs
2 parents d1a15f4 + b7c3018 commit 4c9ff6f

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

Modules/xSharePoint/DSCResources/MSFT_xSPInstallPrereqs/MSFT_xSPInstallPrereqs.psm1

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,17 @@ function Get-TargetResource
2121
$installedItems = Get-CimInstance -ClassName Win32_Product
2222
#TODO: Ensure this checks for all prereqs, believe this list is missing a couple
2323
#TODO: Check the list on other operating systems, this was tested on 2012 R2
24-
$returnValue.Add("Microsoft SQL Server 2008 R2 Native Client", ($null -ne ($installedItems | Where-Object {$_.Name -eq "Microsoft SQL Server 2008 R2 Native Client"})))
25-
$returnValue.Add("Microsoft Sync Framework Runtime v1.0 SP1 (x64)", ($null -ne ($installedItems | Where-Object {$_.Name -eq "Microsoft Sync Framework Runtime v1.0 SP1 (x64)"})))
26-
$returnValue.Add("AppFabric 1.1 for Windows Server", ($null -ne ($installedItems | Where-Object {$_.Name -eq "AppFabric 1.1 for Windows Server"})))
27-
$returnValue.Add("Microsoft Identity Extensions", ($null -ne ($installedItems | Where-Object {$_.Name -eq "Microsoft Identity Extensions"})))
28-
$returnValue.Add("Active Directory Rights Management Services Client 2.0", ($null -ne ($installedItems | Where-Object {$_.Name -eq "Active Directory Rights Management Services Client 2.0"})))
29-
$returnValue.Add("WCF Data Services 5.0 (for OData v3) Primary Components", ($null -ne ($installedItems | Where-Object {$_.Name -eq "WCF Data Services 5.0 (for OData v3) Primary Components"})))
30-
$returnValue.Add("WCF Data Services 5.6.0 Runtime", ($null -ne ($installedItems | Where-Object {$_.Name -eq "WCF Data Services 5.6.0 Runtime"})))
31-
$returnValue.Add("Microsoft CCR and DSS Runtime 2008 R3", ($null -ne ($installedItems | Where-Object {$_.Name -eq "Microsoft CCR and DSS Runtime 2008 R3"})))
32-
24+
$returnValue.Add("Microsoft SQL Server 2008 R2 Native Client", (($installedItems | ? {$_.Name -eq "Microsoft SQL Server 2008 R2 Native Client"}) -ne $null))
25+
$returnValue.Add("Microsoft Sync Framework Runtime v1.0 SP1 (x64)", (($installedItems | ? {$_.Name -eq "Microsoft Sync Framework Runtime v1.0 SP1 (x64)"}) -ne $null))
26+
$returnValue.Add("AppFabric 1.1 for Windows Server", (($installedItems | ? {$_.Name -eq "AppFabric 1.1 for Windows Server"}) -ne $null))
27+
28+
# Detect Identity extensions from the registry as depending on the user that installed it may not appear in the WmiObject call
29+
$returnValue.Add("Microsoft Identity Extensions", (@(Get-ChildItem HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\ -Recurse | ? {$_.GetValue("DisplayName") -eq "Microsoft Identity Extensions" }).Count -gt 0))
30+
$returnValue.Add("Active Directory Rights Management Services Client 2.0", (($installedItems | ? {$_.Name -eq "Active Directory Rights Management Services Client 2.0"}) -ne $null))
31+
$returnValue.Add("WCF Data Services 5.0 (for OData v3) Primary Components", (($installedItems | ? {$_.Name -eq "WCF Data Services 5.0 (for OData v3) Primary Components"}) -ne $null))
32+
$returnValue.Add("WCF Data Services 5.6.0 Runtime", (($installedItems | ? {$_.Name -eq "WCF Data Services 5.6.0 Runtime"}) -ne $null))
33+
$returnValue.Add("Microsoft CCR and DSS Runtime 2008 R3", (($installedItems | ? {$_.Name -eq "Microsoft CCR and DSS Runtime 2008 R3"}) -ne $null))
34+
3335
$returnValue
3436
}
3537

0 commit comments

Comments
 (0)