On the Windows Settings > System > About page, the "Windows specifications" section presents the following information.
Edition Windows 10 Enterprise
Version 20H2
OS build 19042.1288
Using the following reports the Version
member as 19042.1288
.
(Get-CimInstance -ClassName 'Win32_OperatingSystem').Version
Where can 20H2
be found in a CIM instance? I cannot find it in any of the following CIM instances.
CIM_OperatingSystem
Win32_OperatingSystem
Win32_SystemOperatingSystem
CodePudding user response:
Indeed, the so-called display version - such as "20H2"
- doesn't seem to be a part of the Win32_OperatingSystem
(CIM_OperatingSystem
appears to be just an alias) and Win32_SystemOperatingSystem
CIM (WMI) classes (as of Windows 10 20H2), but you can obtain it from the registry:
Get-ItemPropertyValue 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' DisplayVersion
Similarly, the release ID - such as "2009"
- is seemingly also only found in the registry:
Get-ItemPropertyValue 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' ReleaseId