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

  • Sandro Pereira
  • Nov 12, 2024
  • 2 min read
Tags: .NET, PowerShell

While everyday users usually don’t need to worry about which .NET Framework versions run on their devices, some applications depend on specific releases to install and work correctly. In addition, developers often work with multiple versions of the platform to build, test, and validate their applications. As a result, knowing which .NET Framework versions are installed on a computer becomes useful in many different scenarios.

Recently, I needed to verify that the correct .NET Framework versions were available in a pre‑production BizTalk Server 2020 environment to ensure compatibility and avoid deployment issues.

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.

📝 One-Minute Brief

Knowing which .NET Framework versions are installed on a machine is essential for troubleshooting, application compatibility, and upgrade planning. In this post, I explain how to quickly check the installed .NET Framework versions using PowerShell. The article shows which commands to use, where the information is stored in Windows, and how to correctly interpret the results to avoid common mistakes.

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:

PowerShell

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! 

buy me a coffee
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 *

The Ultimate Cloud
Management Platform for Azure

Supercharge your Azure Cost Saving

Learn More
Turbo360 Widget

Back to Top