Hi folks, I have machines that are showing as Windows 10 instead of 11 when using OSBUILD2 %21 to attempt to display the installed OS. Tried the latest version as well but no change. Any ideas on what I could check?
OSBUILD2 does 2 things:
1. WMI call to Win32_OperatingSystem
2. Registry read from HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion
%21 is the ProductName value from the registry. %18 is DisplayVersion from the registry. %15, %16, %17, %18, %21 are all from the registry, *if* that registry entry exists.
I would be interested to know if you're seeing something different.
ProductName is showing "Windows 10 Enterprise". In doing some Google searches about this, there seems to be common consensus that MS doesn't care about that value being accurate. I'm seeing this on fresh installs too, not upgrades from Windows 10. Do we have any other ways of grabbing the OS name?
(Get-WmiObject Win32_OperatingSystem).Caption will grab the correct name through PowerShell. Anyway to integrate that into the config file?
That is returned in %1 or %operating_system%
That totally fixed it. I'll update our config to use %1 instead of %21. Thanks!