How do I find the version of .NET that I have installed?
Windows Server 2016
ITMS 8.7.1
There are a few ways to determine the version of .NET that is installed.
1. Run the following Powershell command as administrator:
Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -Recurse | Get-ItemProperty -Name version -EA 0 | Where { $_.PSChildName -Match '^(?!S)\p{L}'} | Select PSChildName, version
This is the output that you will see after running the Powershell command above:
2. Run the following Powershell command as administrator:
$release = Get-ItemPropertyValue -LiteralPath 'HKLM:SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full' -Name Release
switch ($release) {
{ $_ -ge 533320 } { $version = '4.8.1 or later'; break }
{ $_ -ge 528040 } { $version = '4.8'; break }
{ $_ -ge 461808 } { $version = '4.7.2'; break }
{ $_ -ge 461308 } { $version = '4.7.1'; break }
{ $_ -ge 460798 } { $version = '4.7'; break }
{ $_ -ge 394802 } { $version = '4.6.2'; break }
{ $_ -ge 394254 } { $version = '4.6.1'; break }
{ $_ -ge 393295 } { $version = '4.6'; break }
{ $_ -ge 379893 } { $version = '4.5.2'; break }
{ $_ -ge 378675 } { $version = '4.5.1'; break }
{ $_ -ge 378389 } { $version = '4.5'; break }
default { $version = $null; break }
}
if ($version) {
Write-Host -Object ".NET Framework Version: $version"
} else {
Write-Host -Object '.NET Framework Version 4.5 or later is not detected.'
}
This is the output that you will see after running the Powershell command above:
3. Open the Registry Editor and go to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP
You will see the following:
Please note in all of these examples the latest version of the .NET Framework installed is 4.8.