Skip to content

Commit

Permalink
[dsccommunity#569] Added explicit cast to int for SQL Server version …
Browse files Browse the repository at this point in the history
…value
  • Loading branch information
bozho committed Jun 2, 2017
1 parent 969aa85 commit 1a29064
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 1a29064

Please sign in to comment.