How to get the correct Windows version from command line, PowerShell included?
As I've tried all solutions/answers from How to find the Windows version from the PowerShell command line , but none is able to give this now:
You can retrieve it from the registry:
Get-ItemPropertyValue 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' DisplayVersion
Note:
20H2
and above.winver.exe
(whose screenshot is shown in the question), apparently showed the ReleaseId
registry value (in lieu of DisplayVersion
above).PS> Winver
Not kidding. One would expect this info to be in Get-ComputerInfo, but it isn't.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.