@@ -21,15 +21,17 @@ function Get-TargetResource
21
21
$installedItems = Get-CimInstance - ClassName Win32_Product
22
22
# TODO: Ensure this checks for all prereqs, believe this list is missing a couple
23
23
# 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
+
33
35
$returnValue
34
36
}
35
37
0 commit comments