System.Runtime.InteropServices.RuntimeInformation
provides information aobut the .NET runtime installation. FrameworkDescription
property return the name of the .NET installation on which an app is running, thus the following PowerShell command returns the .NET framework version on which the current PowerShell was built on: PS C:\> [System.Runtime.InteropServices.RuntimeInformation]::FrameworkDescription .NET 9.0.1
Value
under the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full
.
[System.Environment]::Version