Check .Net Framework Version / tool to find out .Net Framework version

The estimated reading time 1 minutes

Check .Net Framework Version / tool to find out .Net Framework version
Updated June 3rd 2020

Hi everyone,

during my daily work I often have to look after .Net Version on different kind of systems (servers and clients). So I thought; why not simplify this task. So I wrote a small powershell skript which checks .Net Framework Version installed on the system by reading registry values. After it checked the version it also opens the corresponding microsoft website.

So here is the website:   How to: Determine which .NET Framework versions are installed

And another link to the Download: .NET-Checker1-1.zip

Here is the sourcecode if you are interested in powershell scripting:

$regpath = "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full"
$test = ((Test-Path $regpath))
if ( $test -eq $true){
 $dotnetver = ((Get-ItemProperty -Path "$regpath" -Name Release).Release) 
  switch ( $dotnetver )
    {
        393295 { $result = ".NET Framework 4.6 (WIN10)Release:$dotnetver"    }
        393297 { $result = ".NET Framework 4.6 (other than WIN10)Release:$dotnetver"    }
        394254 { $result = ".NET Framework 4.6.1 (WIN10)Release:$dotnetver)"   }
        394271 { $result = ".NET Framework 4.6.1 (other than WIN10)Release:$dotnetver" }
        394802 { $result = ".NET Framework 4.6.2 (WIN10)Release:$dotnetver"  }
        394806 { $result = ".NET Framework 4.6.2 (other than WIN10)Release:$dotnetver" }
        460798 { $result = ".NET Framework 4.7 (WIN10)Release:$dotnetver"  }
        460805 { $result = ".NET Framework 4.7 (other than WIN10)Release:$dotnetver" }
        461308 { $result = ".NET Framework 4.7.1 (WIN10 FallCreatorsUpdate)Release:$dotnetver"   }
        461310 { $result = ".NET Framework 4.7.1 (other os)Release:$dotnetver"   }
        461808 { $result = ".NET Framework 4.7.2 (WIN10 april2018) Release:$dotnetver"  }
        461814 { $result = ".NET Framework 4.7.2 (other os)Release:$dotnetver"  }
        default {".other .Net Version detected )Release: $dotnetver"}
      }

      Write-Host "Following .Net Version is installed on this computer: $result" -ForegroundColor Green
      $result
      Start-Process -FilePath https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed 
      pause
    }
    else{
      Write-Host "No .Net Framework found!"
      pause
    }

this small tool is not perfect, but it does meet my requirements so far. If you have some advices do not hesitate to write a comment.

If you like the tool please push the button “helpful”.

Happy checking.

Print Friendly, PDF & Email
Was this article helpful?
YesNo
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments