Skip to content

Instantly share code, notes, and snippets.

View JimWolff's full-sized avatar

Jim Wolff JimWolff

  • CYBER1UP ApS
  • Denmark
View GitHub Profile
@JimWolff
JimWolff / CheckInstalled.NetVersion.ps1
Created June 19, 2017 00:58
Powershell to check which .Net version is installed
# credit: https://stackoverflow.com/a/3495491/665879
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" }