Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Windows 10 / How to Check .NET Framework Version Installed on Windows

October 25, 2023 PowerShellWindows 10Windows 11Windows Server 2019

How to Check .NET Framework Version Installed on Windows

On Windows, you can install and run multiple versions of the .NET Framework at the same time. When developing or deploying a new application based on .NET libraries, sometimes you need to know in advance which versions and service packs of the .Net Framework are already installed on the user’s computer or server. You can get a list of the .NET Framework versions installed on your computer in several ways.

Contents:
  • Checking the .NET Framework Version via the Windows Registry
  • How to Check the .NET Framework Version with PowerShell?
  • List Installed .NET Versions on Remote Computers
  • How to Find Out .NET Framework Version with CMD?

Checking the .NET Framework Version via the Windows Registry

When you install or update any version of the .NET Framework, the changes are written to the Windows registry.

Run the Registry Editor (regedit.exe) and go to registry key HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP. This reg key contains information about all versions of .NET on the computer. Expand any subkey and pay attention to the following parameters (for .Net 4.x you need to expand the Full subkey):

  • Install — installation flag (if equal to 1, then this version of .Net is installed on the computer);
  • Install Path — the directory where this .Net version is installed;
  • Release — .NET release number;
  • Version — the full version number of .Net Framework.

.Net version number and release in registry

Tip. For .NET 4.0 and newer, if the Full subkey is missing, it means that this version of the Framework is not installed on the computer.

In this example, you can see that the .NET Framework v2.0.50727, 3.0, 3.5, and 7.0 (release 460805) are installed.

Please note that in server operating systems starting from Windows Server 2012, all basic .Net versions (3.5 and 4.5) are installed as Windows features (Installing .NET Framework 3.5 on Windows Server and Windows 10), and minor ones (4.5.1, 4.5.2, etc.) are installed as separate updates via Windows Update or WSUS.

Using the following table, you can map the release number to the version of the .NET Framework (for .NET 4.5 and newer).

Release Number.NET Framework version
378389.NET Framework 4.5
378675NET Framework 4.5.1 on Windows 8.1 and Windows Server 2012 R2
378758.NET Framework 4.5.1 on Windows 8, Windows 7 SP1, Windows Vista SP2
379893.NET Framework 4.5.2
393295.NET Framework 4.6 on Windows 10
393297.NET Framework 4.6
394254.NET Framework 4.6.1 on Windows 10 1511
394271.NET Framework 4.6.1
394802.NET Framework 4.6.2 on Windows 10 1607
394806.NET Framework 4.6.2
460798.NET Framework 4.7 on Windows 10 1703
460805.NET Framework 4.7
461308.NET Framework 4.7.1 on Windows 10 1709
461310.NET Framework 4.7.1
461808.NET Framework 4.7.2 on Windows 10 1803
461814.NET Framework 4.7.2
528372.NET Framework 4.8 on Windows 10 2004, 20H2, and 21H1
528040.NET Framework 4.8 on Windows 10 1903 and 1909
528449.NET Framework 4.8 on Windows Server 2022 and Windows 11
528049.NET Framework 4.8 (other Window versions)
.NET Framework 4.8 is the latest available version of the .NET Framework.  

How to Check the .NET Framework Version with PowerShell?

You can get information about installed versions and releases of the NET Framework on your computer using PowerShell. The easiest way to get this information directly from the registry is by using the Get-ChildItem and Get-ItemProperty cmdlets (more about managing registry entries with PowerShell).

To display a list of all versions of the .Net Framework on a computer, run the command:

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

find out net framework version with powershell

.Net versions 2.0, 3.0, 3.5, and 4.7 are installed on this computer.

Starting with .Net v4.0, the newer Framework version overwrites (replaces) the older version. Those, if .NET Framework 4.7 was installed on the computer, then when installing .NET Framework 4.8, the old version will be replaced.

You can display only the release number for (.Net 4.x versions):

(Get-ItemProperty ‘HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full’ -Name Release).Release

check net framework number with powershell

According to the table, the number 528449 corresponds to the .Net Framework 4.8 on Windows 11.

List Installed .NET Versions on Remote Computers

You can remotely get a list of the .Net Framework versions installed on computers on your network using PowerShell.

Here is a small PowerShell script that queries a list of computers from a text file and remotely checks for installed versions of the .Net Framework. The WinRM Invoke-Command cmdlet is used to run commands on remote computers.

Function GetNetFrameworkVersion {
Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -recurse |
Get-ItemProperty -name Version,Release -EA 0 |
Where { $_.PSChildName -match '^(?![SW])\p{L}'} |
Select PSChildName, Version, Release, @{
name="Product"
expression={
switch -regex ($_.Release) {
"378389" { [Version]"4.5" }
"378675|378758" { [Version]"4.5.1" }
"379893" { [Version]"4.5.2" }
"393295|393297" { [Version]"4.6" }
"394254|394271" { [Version]"4.6.1" }
"394802|394806" { [Version]"4.6.2" }
"460798|460805" { [Version]"4.7" }
"461308|461310" { [Version]"4.7.1" }
"461808|461814" { [Version]"4.7.2" }
"528040|528049|528449|528372" { [Version]"4.8" }
"533320|533325" { [Version]"4.8.1"}
{$_ -gt 533325} {"unidentified version (> 4.8.1)" }
}
}
}
}
$result=@()
$servers= Get-Content C:\Scripts\my_servers.txt
foreach ($server in $servers)
{
$result+=Invoke-Command -ComputerName $server -ScriptBlock $function:GetNetFrameworkVersion
}
$result|  select PSComputerName,@{name = ".NET Framework"; expression = {$_.PSChildName}},Product,Version,Release| Out-GridView

The script displays a graphical table (via Out-GridView) with a list of .Net Framework versions installed on remote computers.

PowerShell script to get .NET Framework version from remote computers

You can also set a list of computers on which to check the .NET version as follows:

$servers= @("comp1","comp2","comp3","comp4")

Or you can get a list of domain computers with the Get-ADComputer cmdlet (from the Active Directory for Windows PowerShell module). The following command will select all active Windows Server hosts in the domain:

$servers= Get-ADComputer -Filter 'operatingsystem -like "*Windows server*" -and enabled -eq "true"'

How to Find Out .NET Framework Version with CMD?

All versions of the .NET Framework are installed into the following Windows folders:

  • %SystemRoot%\Microsoft.NET\Framework
  • %SystemRoot%\Microsoft.NET\Framework64

You can simply open that folder and see a list of installed .NET versions. Each version has a separate directory with a v and a version number as the folder name. You can list the installed versions of the .NET Framework from the command prompt:

dir %WINDIR%\Microsoft.Net\Framework\v* /O:-N /B

Determine Which .NET Framework Versions Are Installed - cmd

This command will list all installed versions except .NET 4.5, since Framework 4.5+ is installed to the v4.0.xxxxx subdirectory.

3 comments
3
Facebook Twitter Google + Pinterest
previous post
Deploying Remote Desktop Services (RDSH) in a Workgroup (without Domain)
next post
Assigning User Licenses in Microsoft 365 (Azure AD) with PowerShell

Related Reading

Zabbix: How to Get Data from PowerShell Scripts

October 27, 2023

Tracking Printer Usage with Windows Event Viewer Logs

October 19, 2023

PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

October 15, 2023

How to Query and Change Teams User Presence...

October 8, 2023

How to Use Ansible to Manage Windows Machines

September 25, 2023

3 comments

Martin Wiedmeyer March 21, 2016 - 4:56 pm

You are missing a colon in your posh command for the registry provider.
dir ′HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full′

Reply
Johan Parlevliet October 24, 2023 - 9:28 am

Please Update the script:
“461814|461808|461814″ { [Version]”4.7.2” }
“528449|528372|528040|528049″ { [Version]”4.8” }
“533320|533325 ” { [Version]”4.8.1″ }
{$_ -gt 533325} { “Undocumented version (> 4.8), please update script” }

Note: [version] removed from last line. Otherwise you would not see that line Undocumented …

Reply
admin October 25, 2023 - 6:06 am

Fixed! Thanks for the info

Reply

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Zabbix: How to Get Data from PowerShell Scripts

    October 27, 2023
  • Tracking Printer Usage with Windows Event Viewer Logs

    October 19, 2023
  • PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

    October 15, 2023
  • Reset Root Password in VMware ESXi

    October 12, 2023
  • How to Query and Change Teams User Presence Status with PowerShell

    October 8, 2023
  • How to Increase Size of Disk Partition in Ubuntu

    October 5, 2023
  • How to Use Ansible to Manage Windows Machines

    September 25, 2023
  • Installing Language Pack in Windows 10/11 with PowerShell

    September 15, 2023
  • Configure Email Forwarding for Mailbox on Exchange Server/Microsoft 365

    September 14, 2023
  • How to View and Change BIOS (UEFI) Settings with PowerShell

    September 13, 2023

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • Manage Windows Updates with PSWindowsUpdate PowerShell Module
  • Configuring Port Forwarding in Windows
  • Start Menu or Taskbar Search Not Working in Windows 10/11
  • Get-ADUser: Find Active Directory User Info with PowerShell
  • Configuring SFTP (SSH FTP) Server on Windows
  • Adding Drivers into VMWare ESXi Installation Image
  • How to Hide Installed Programs in Windows 10 and 11
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top