Microsoft Configuration Manager
An integrated solution for for managing large groups of personal computers and servers.
4,121 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
What kind of query or report can I use to retrieve the computer numbers for different OS versions, such as windows 10 21H2, windows 10 22H2, windows 11 21H2, windows 11 22H2, windows 11 23H2?
Hi, @Quino Neious
Thank you for posting in Microsoft Q&A forum.
Try below query to see if it helps:
select v_R_System.Operating_System_Name_and0 as 'Operating System',
v_GS_OPERATING_SYSTEM.BuildNumber0 as 'Build Number',
case
when v_GS_OPERATING_SYSTEM.BuildNumber0 = '22621' then 'Windows 11 22H2'
when v_GS_OPERATING_SYSTEM.BuildNumber0 = '22000' then 'Windows 11 21H2'
when v_GS_OPERATING_SYSTEM.BuildNumber0 = '19045' then 'Windows 10 22H2'
when v_GS_OPERATING_SYSTEM.BuildNumber0 = '19044' then 'Windows 10 21H2'
when v_GS_OPERATING_SYSTEM.BuildNumber0 = '19043' then 'Windows 10 21H1'
End as 'Windows 10 Version', Count(*) as 'Total Devices'
from v_r_system
inner join v_gs_operating_system
on v_R_System.ResourceID=v_GS_OPERATING_SYSTEM.ResourceID
where v_R_System.Operating_System_Name_and0 like '%Microsoft Windows NT Workstation 10.0%'
Group by v_R_System.Operating_System_Name_and0,v_GS_OPERATING_SYSTEM.BuildNumber0
Order by [Build Number] Desc
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Add comment".