Updated question
Winver gives you the Windows 10 full version number: Version + Build + "SubBuild", e.g. 1909 (Build 18363.1556) as GUI a window.
I found the ver command which gives the full build number as a CLI output but not the version number or the code name. All other usual CLI suspects like systeminfo etc. don't give you version number either.
Is there a command that will give you the version number (preferably as well as the code name) as a CLI output?
I'm interested in CMD as well as PowerShell. The thing I prefer is a easy to remember command.
Old question (just for reference)
Winver gives you the Windows 10 code name as well as the Windows full version number (Version + Build + "SubBuild") as GUI a window. I found the ver command which gives the full version number as a CLI output but not the code name (code name is called DisplayVersion in the registry since 20H1). All other usual suspects like systeminfo etc. give you a more or less complete version number or the ReleaseId but they don't give you code name either.
Is there a command that give you the code name as a CLI output. I'm interested in CMD as well as PowerShell. The thing I prefer is a easy to remember command.
Note: I checked the answers of the supposed duplicate question, I didn't find any answer which gives you the code name, plz let me know if I overlook it.
Note: The registry holds the code name DisplayVersion-value under the HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion-key. But it gets created only after an update has been made (even if was a minor update did not change the version number).
Note: I just realized, the version number becomes the code name since 20H2.

DisplayVersiononly gets created once you have installed 20H2+ on the machine, since the key does not exist before that version,ReleaseIdis used instead. The answer reflects the reality of the situation today and yesterday though, so other then my OCD that can't stand partially incorrect information, I will leave it be. – Ramhound Dec 14 '21 at 21:30