Skip to content

Instantly share code, notes, and snippets.

@PSingletary
Created December 18, 2017 12:40
Show Gist options
  • Save PSingletary/787044d7719a4c6b2c00e7686bab5707 to your computer and use it in GitHub Desktop.
Save PSingletary/787044d7719a4c6b2c00e7686bab5707 to your computer and use it in GitHub Desktop.
PowerShell oneliner to list all the installed .NET versions on a local computer - http://www.happysysadm.com/2017/12/powershell-oneliner-to-list-all.html
<#
.SYNOPSIS
<A brief description of the function or script. This keyword can be used only once in each topic.>
.DESCRIPTION
<A detailed description of the function or script. This keyword can be used only once in each topic.>
.LINK
http://www.happysysadm.com/2017/12/powershell-oneliner-to-list-all.html
#>
((ls 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -rec|? name -match 'v1.1.4322$|v2.0.50727$|v3.0$|v3.5$|v4\\Full$').name -replace 'HKEY_LOCAL_MACHINE','HKLM:'|%{ Get-ItemProperty $_}).Version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment