SQL Server 2016 SP1

To search the registry, I was following the procedure given in this MSDN page. You have to drill down into the v4 and look under the "Full" node as shown in the screenshot on that page. On my server, Release showed 460805, translates to v4.7 as shown in the table below their screenshot.

The powershell script I used is the following from the page I pointed to earlier. It is really just reading the registry and doing the DWORD to version translations.

Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -recurse |
Get-ItemProperty -name Version,Release -EA 0 |
Where { $_.PSChildName -match '^(?!S)\p{L}'} |
Select PSChildName, Version, Release, @{
  name="Product"
  expression={
      switch -regex ($_.Release) {
        "378389" { [Version]"4.5" }
        "378675|378758" { [Version]"4.5.1" }
        "379893" { [Version]"4.5.2" }
        "393295|393297" { [Version]"4.6" }
        "394254|394271" { [Version]"4.6.1" }
        "394802|394806" { [Version]"4.6.2" }
        "460798" { [Version]"4.7" }
        {$_ -gt 460798} { [Version]"Undocumented 4.7 or higher, please update script" }
      }
    }
}
1 Like