I've read a bunch of threads on here about this and I want to get the Windows edition (22H2 for instance).
This is the code:
$ReleaseID = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion').ReleaseId$DisplayVersion = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion').DisplayVersion$ReleaseID$DisplayVersion
$ReleaseID outputs 2009
$DisplayVersion outputs 22H2
Why is $ReleaseID outputing 2009
? What is this number?