Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get Windows "codename" [duplicate]

Is there a PowerShell command that will retrieve the Windows "codename"?

10.0.19042 has a "codename" of "20H2".

Is there a Get-CimInstance class (or other command) that contains "20H2"?

PS C:\> $PSVersionTable.PSVersion.ToString()
7.3.2
like image 508
lit Avatar asked May 26 '26 19:05

lit


1 Answers

Starting with 20H2, you can find this value in the registry key Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion In the DisplayVersion value.

(Get-Item "HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion").GetValue('DisplayVersion')
like image 163
toastifer Avatar answered May 28 '26 10:05

toastifer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!