Skip to content

simpler way in Powershell (Windows 10) #14932

Closed

Description

@verdy-p

Just type this in Powershell, to get all details:

Get-ItemProperty "HKLM:SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full"

Example of output:

CBS : 1
Install : 1
InstallPath : C:\Windows\Microsoft.NET\Framework64\v4.0.30319
Release : 528209
Servicing : 0
TargetVersion : 4.0.0
Version : 4.8.03921
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4
PSChildName : Full
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Activity

  1. added and removed
    ⌚ Not Triaged
    on Oct 3, 2019
  2. Thraka commented on Oct 3, 2019

    @Thraka
    Contributor

    Hello.

    The article specifically talks about testing the version; the PowerShell provided in the article does test a version. However, you happen to point out that the PowerShell code could be simplified for PS5.0. I'll file a fix for this.

    I do believe though that you're referencing the Version property of the registry key. That is reliable for Framework versions prior to 4.5, but starting with 4.5 it's not reliable and the Release property is the suggested most reliable way to detect version.

  3. self-assigned this
    on Oct 3, 2019
  4. added this to the October 2019 milestone on Oct 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions