How to check which .NET Framework versions are installed with PowerShell

Posted: November 12, 2024  |  Categories: PowerShell

While everyday users typically don’t need to worry about which .NET Framework versions are installed on their devices, some applications require specific releases to install and function correctly. Additionally, developers often need to work with multiple versions of the development platform to build and test their applications. Consequently, knowing the installed .NET version on a computer can be beneficial in many different scenarios.

I recently needed to check and ensure that the correct .NET Framework versions were installed in the pre-production BizTalk Server 2020 environment.

Of course, you can achieve this goal in many ways:

  • By accessing the Registry to determine which versions are installed
  • By using a reg query in the Command Prompt
  • or, my favorite, to use a simple PowerShell script to query this information for you.

To achieve this goal, you can use the following PowerShell script:

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

The output will be something like this:

Download

THIS POWERSHELL SCRIPT IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND.

You can download the PowerShell script to identify which .NET Framework versions are installed from GitHub here:

I hope you find this helpful! If you liked the content or found it useful and want to help me write more, you can help us buy a Star Wars Lego for my son! 

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

Leave a Reply

Your email address will not be published. Required fields are marked *

turbo360

Back to Top