Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Where can I find the Windows version in a CIM instance?

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 instnace? I cannot find it in any of the following CIM instances.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

CIM_OperatingSystem
Win32_OperatingSystem
Win32_SystemOperatingSystem

>Solution :

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
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading