.NET (dot net) framework is the software development framework developed by Microsoft. The .Net framework is utilized to create and run applications. It is basically made up of programming languages, libraries, and tools. The .Net framework is designed for programmers to develop games, web apps, or programs for desktops, laptops, and tablets. The .NET framework is an open-source and cross-network application, which means it is not limited to Windows only but is also supported on MacOS and Linux OS.
Standard users do not often need not to know which .NET version is installed on the system. However, they might need it when an app or game requires the specific .NET version installed on the system. Application developers usually need multiple .NET versions to test their apps and games. That’s why it is very beneficial to have the knowledge about the current version of the .NET framework installed.
This article will present a detailed guide to check the .NET version using PowerShell.
How to Find .NET Versions on Windows Using PowerShell?
Whether you are a developer or a standard user, Windows 10, or Windows 11 provides several methods including Registry Editor, Local Group Policy Editor, File Explorer, Command Prompt, and PowerShell to check the .NET framework version. However, this very guide will demonstrate a method to check the .NET framework version using the Windows PowerShell application.
Step 1: Press the Windows key + X shortcut keys to open the Quick Access Menu and select Windows PowerShell (Admin):
Step 2: Type the below code in the PowerShell console and press the Enter button:
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
Bonus Tip: How to Check the Release Number of the .NET Framework on Windows Using PowerShell?
This is an alternate method to find the release number of the .NET framework using PowerShell. The release number value determines the version of the current .NET framework installed:
(Get-ItemProperty ‘HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full’ -Name Release).Release
Bonus Tip: How to Install or Enable .NET on Windows Using PowerShell?
Normally, every Windows edition has the .NET framework installed on it. But, if your Windows doesn’t have the .NET framework installed, or if it is disabled, then, luckily, .NET can be installed and re-enabled using PowerShell. Before installing or enabling the .NET framework, make sure it is not already installed or enabled. To check if the .NET framework is already installed on the system or not, simply type the mentioned command in the PowerShell console and press Enter key:
Get-WindowsCapability -Online -Name NetFx3
Once, you confirm that the .NET framework is not installed or enabled on Windows, then, you can execute the mentioned command in the PowerShell console to enable or install the.NET framework on Windows:
Enable-WindowsOptionalFeature -Online -FeatureName "NetFx3"
Bonus Tip: Use the DISM Utility in PowerShell to Install the .NET Framework on Windows
Another way to install the .NET framework on Windows is by using the DISM utility. The DISM (Deployment Image Servicing and Management) utility is used to mount and check the information about the Windows image files. To install the .NET framework using the DISM utility in PowerShell check the mentioned steps.
Step 1: Launch PowerShell as an administrator from the Windows Start menu:
Step 2: Type the mentioned code in the PowerShell console and press the Enter button:
Dism.exe /online /enable-feature /featurename:NetFX3 /All /Source:D:\sources\sxs /LimitAccess
Bonus Tip: How to Find .NET Versions on Windows Using Command Prompt (CMD)?
Alongside PowerShell, Command Prompt can also be used to find the .NET framework versions on Windows. Command Prompt (cmd.exe) is the Windows default command-line interpreter. It is used to perform the advanced administrator tasks.
Step 1: Launch Command Prompt from the Start menu:
Step 2: Type the mentioned command in the CMD console and press the Enter button:
reg query "HKLM\SOFTWARE\Microsoft\Net Framework Setup\NDP" /s
Conclusion
Press Windows + R to open the Run dialog box, type PowerShell, and press Ctrl + Shift + Enter to open PowerShell as an administrator. Then, type the 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 code, and press Enter to check the .NET version on Windows. To check the release number of the .NET version execute this (Get-ItemProperty ‘HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full’ -Name Release).Release code in the console. Read the above article to learn the practical way of checking the .NET version on Windows using PowerShell.