Query for getting computer numbers by OS version

Quino Neious 60 Reputation points
2024-04-29T12:27:31.8+00:00

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?

Microsoft Configuration Manager
0 comments No comments
{count} votes

Accepted answer
  1. AllenLiu-MSFT 40,961 Reputation points Microsoft Vendor
    2024-04-30T01:36:28.3133333+00:00

    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".

    0 comments No comments

0 additional answers

Sort by: Most helpful