From 8a771af0ed991e80a2d180fe7f4b73b617a07494 Mon Sep 17 00:00:00 2001 From: Marko Bozikovic Date: Tue, 30 May 2017 15:06:52 +0100 Subject: [PATCH] [#569] Added explicit cast to int for SQL Server version value --- .../MSFT_xSQLServerRSConfig/MSFT_xSQLServerRSConfig.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DSCResources/MSFT_xSQLServerRSConfig/MSFT_xSQLServerRSConfig.psm1 b/DSCResources/MSFT_xSQLServerRSConfig/MSFT_xSQLServerRSConfig.psm1 index 4e6b0ed47..54f178a84 100644 --- a/DSCResources/MSFT_xSQLServerRSConfig/MSFT_xSQLServerRSConfig.psm1 +++ b/DSCResources/MSFT_xSQLServerRSConfig/MSFT_xSQLServerRSConfig.psm1 @@ -81,7 +81,7 @@ function Set-TargetResource Import-SQLPSModule $InstanceKey = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\RS" -Name $InstanceName).$InstanceName - $SQLVersion = ((Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\$InstanceKey\Setup" -Name "Version").Version).Split(".")[0] + $SQLVersion = [int]((Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\$InstanceKey\Setup" -Name "Version").Version).Split(".")[0] if($InstanceName -eq "MSSQLSERVER") { $RSServiceName = "ReportServer"