Find Dot NET Version using PowerShell

This post is about showing you how to find Dot NET version using PowerShell. Knowing exactly which .NET versions are installed on a Windows device helps with app compatibility, patch validation, and software deployment decisions.

Because Dot NET now includes two product lines: .NET Framework (4.x, Windows-only, in-place updates) and .NET (Core/5+) (cross-platform, side-by-side), the method you use depends on what you are checking. This guide provides step-by-step PowerShell methods for both, including fast one-liners, structured inventory scripts, and Intune-friendly detection samples.

Get .NET Version using PowerShell

You can easily find the .NET version information from the Windows Registry. Run the following PowerShell command to query the registry key and get the values for Release, Version, Install, and InstallPath.

PowerShell

Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full' | Select
-Object Release, Version, Install, InstallPath
Get .NET Version using PowerShell

Get .Net Release Info using PowerShell

You can get the .Net release information value using PowerShell by running below command. Output will be an integer value like 533509. This (533509) is a Windows 11 September 2025 Release of dot net framework version 4.8.1.

PowerShell

Get-ItemPropertyValue 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full' -Name Release
Get .Net Release Info using PowerShell

Dot NET Release to Version Mapping PowerShell Script

When you have the release information for Dot NET, you can map it to its corresponding version number by using a PowerShell script. I have created and uploaded this script on my GitHub repo link: Get-DotNetFramework.ps1.

  • Download the script from the GitHub repo.
  • Open PowerShell and run below command to execute the script. If required, update the path of the script in -File parameter.

PowerShell

powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\DotNetRelease_to_Ver_Map.ps1
Dot NET Release to Version Mapping PowerShell Script

Intune Detection Example

For Intune, you might require a detection script to check and confirm if a specific dot net framework version is installed on the target machine. Depending upon the result, take necessary action. The script will return an exit code 0 if the given dot net version is found, otherwise exit code will be 1.

Detect .NET Framework 4.8 or later present

$minRelease = 528040  # 4.8 baseline
$reg = 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full'
if (!(Test-Path $reg)) { exit 1 }
$release = [int](Get-ItemPropertyValue $reg -Name Release -ErrorAction Stop)
if ($release -ge $minRelease) { exit 0 } else { exit 1 }

Detect .NET runtime 8.x installed

$dotnet = Join-Path $env:ProgramFiles 'dotnet\dotnet.exe'
if (!(Test-Path $dotnet)) { exit 1 }
$has8 = & $dotnet --list-runtimes | Select-String -SimpleMatch 'Microsoft.NETCore.App 8.'
if ($has8) { exit 0 } else { exit 1 }

File Version of Dot NET Core Runtime Files

Execute the following command on PowerShell console to get file version information of Dot NET core runtime files.

(Get-Item "$env:windir\Microsoft.NET\Framework64\v4.0.30319\clr.dll").VersionInfo | Select-Object FileVersion, ProductVersion
File Version of Dot NET Core Runtime Files

All in One Script

You can use this all-in-one script Get-DotNetSummary.ps1 to retrieve detailed .NET information, as shown in the screenshot below. The output includes the .NET Framework version, Release, Install key value, Install path, DotNetHost, Runtimes, and SDK details.

Get-DotNetSummary.ps1 Script output

Quick Reference

RequirementCommand
.NET Framework 4.x Release integerGet-ItemPropertyValue ‘HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full’ -Name Release
Friendly Framework versionGet-DotNetFramework function above
List .NET runtimes& “$env:ProgramFiles\dotnet\dotnet.exe” –list-runtimes
List .NET SDKs& “$env:ProgramFiles\dotnet\dotnet.exe” –list-sdks
.NET host versionGet-ItemPropertyValue ‘HKLM:\SOFTWARE\dotnet\Setup\InstalledVersions\x64\sharedhost’ -Name Version
All in OneGet-DotNetSummary function above
  • If dotnet is not found, it may not be installed or not added to PATH. Use the full path shown above.
  • On ARM64 devices, .NET installs may show under HKLM:\SOFTWARE\dotnet\Setup\InstalledVersions\arm64. Adjust queries accordingly.
  • On 32-bit systems, use Framework instead of Framework64 paths and check x86 registry hives.

Leave a Comment