none
Query to Show Windows 10 Version RRS feed

  • Question

  • Dears,

    I need SCCM query to show me Windows 10 version number for example is it "1607" or any other versions. I can create query for build number and version but it will not showing version type.

    Best Regards,

    Thursday, May 17, 2018 10:13 AM

All replies

  • select *  from  SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.BuildNumber = "<insert build no>"

    Check the build numbers here https://www.microsoft.com/en-us/itpro/windows-10/release-information


    Cheers Paul | http://sccmentor.com

    • Proposed as answer by Dan Padgett Thursday, May 17, 2018 11:38 AM
    Thursday, May 17, 2018 10:32 AM
    Moderator
  • Is there a way for the query to show the version so you don't have to compare to build.
    Thursday, November 28, 2019 4:49 AM
  • Try this query by adding it to the report builder. It will prompt for the collection ID. 

    I took the default SCCM report and modified a bit:

    select  distinct 
     v_R_System_Valid_Alias.ResourceID, 
     v_R_System_Valid_Alias.Netbios_Name0 AS [Computer Name], 
     v_R_System_Valid_Alias.Resource_Domain_OR_Workgr0 AS [Domain/Workgroup], 
     v_Site_Alias.SiteName as [SMS Site Name], 
     [Top Console User] = CASE 
     when (v_GS_SYSTEM_CONSOLE_USAGE_MAXGROUP_Alias.TopConsoleUser0 is NULL or v_GS_SYSTEM_CONSOLE_USAGE_MAXGROUP_Alias.TopConsoleUser0 = '-1') 
     then @UnknownLoc 
     Else v_GS_SYSTEM_CONSOLE_USAGE_MAXGROUP_Alias.TopConsoleUser0 
     End, 
     v_GS_OPERATING_SYSTEM_Alias.Caption0 AS [Operating System], 
     v_GS_OPERATING_SYSTEM_Alias.CSDVersion0 AS [Service Pack Level],
    v_GS_OPERATING_SYSTEM_Alias.Version0 as [Build Version],
     WSLN.Value as [Version],
     v_GS_SYSTEM_ENCLOSURE_UNIQUE_Alias.SerialNumber0 AS [Serial Number], 
     v_GS_SYSTEM_ENCLOSURE_UNIQUE_Alias.SMBIOSAssetTag0 AS [Asset Tag], 
     v_GS_COMPUTER_SYSTEM_Alias.Manufacturer0 AS [Manufacturer], 
     v_GS_COMPUTER_SYSTEM_Alias.Model0 AS [Model], 
     v_GS_X86_PC_MEMORY_Alias.TotalPhysicalMemory0 AS [Memory (KBytes)], 
     v_GS_PROCESSOR_Alias.NormSpeed0 AS [Processor (GHz)], 
     (Select sum(Size0) 
     from fn_rbac_GS_LOGICAL_DISK(@UserSIDs) v_GS_LOGICAL_DISK_Alias inner join v_FullCollectionMembership v_FullCollectionMembership_Alias on (v_FullCollectionMembership_Alias.ResourceID = v_GS_LOGICAL_DISK_Alias.ResourceID ) 
      where v_GS_LOGICAL_DISK_Alias.ResourceID =v_R_System_Valid_Alias.ResourceID and 
      v_FullCollectionMembership_Alias.CollectionID = @CollectionID) As [Disk Space (MB)], 
     (Select sum(v_GS_LOGICAL_DISK_Alias.FreeSpace0) 
     from fn_rbac_GS_LOGICAL_DISK(@UserSIDs) v_GS_LOGICAL_DISK_Alias inner join v_FullCollectionMembership v_FullCollectionMembership_Alias on (v_FullCollectionMembership_Alias.ResourceID = v_GS_LOGICAL_DISK_Alias.ResourceID ) 
     where v_GS_LOGICAL_DISK_Alias.ResourceID =v_R_System_Valid_Alias.ResourceID and v_FullCollectionMembership_Alias.CollectionID = @CollectionID) As [Free Disk Space (MB)] 
     from fn_rbac_R_System_Valid(@UserSIDs) v_R_System_Valid_Alias 
     inner join v_GS_OPERATING_SYSTEM v_GS_OPERATING_SYSTEM_Alias on (v_GS_OPERATING_SYSTEM_Alias.ResourceID = v_R_System_Valid_Alias.ResourceID) 
     left join v_GS_SYSTEM_ENCLOSURE_UNIQUE v_GS_SYSTEM_ENCLOSURE_UNIQUE_Alias on (v_GS_SYSTEM_ENCLOSURE_UNIQUE_Alias.ResourceID = v_R_System_Valid_Alias.ResourceID) 
     LEFT join v_GS_COMPUTER_SYSTEM v_GS_COMPUTER_SYSTEM_Alias on (v_GS_COMPUTER_SYSTEM_Alias.ResourceID = v_R_System_Valid_Alias.ResourceID) 
     LEFT join v_GS_X86_PC_MEMORY v_GS_X86_PC_MEMORY_Alias on (v_GS_X86_PC_MEMORY_Alias.ResourceID = v_R_System_Valid_Alias.ResourceID) 
     LEFT join v_GS_PROCESSOR v_GS_PROCESSOR_Alias on (v_GS_PROCESSOR_Alias.ResourceID = v_R_System_Valid_Alias.ResourceID) 
     inner join v_FullCollectionMembership v_FullCollectionMembership_Alias on (v_FullCollectionMembership_Alias.ResourceID = v_R_System_Valid_Alias.ResourceID) 
     left  join fn_rbac_Site(@UserSIDs) v_Site_Alias on (v_FullCollectionMembership_Alias.SiteCode = v_Site_Alias.SiteCode) 
     LEFT join v_GS_LOGICAL_DISK v_GS_LOGICAL_DISK_Alias on (v_GS_LOGICAL_DISK_Alias.ResourceID = v_R_System_Valid_Alias.ResourceID) and v_GS_LOGICAL_DISK_Alias.DeviceID0=SUBSTRING(v_GS_OPERATING_SYSTEM_Alias.WindowsDirectory0,1,2) 
     left join v_GS_SYSTEM_CONSOLE_USAGE_MAXGROUP v_GS_SYSTEM_CONSOLE_USAGE_MAXGROUP_Alias on (v_GS_SYSTEM_CONSOLE_USAGE_MAXGROUP_Alias.ResourceID = v_R_System_Valid_Alias.ResourceID) 
    left join fn_GetWindowsServicingStates() WSS on WSS.Build =  v_GS_OPERATING_SYSTEM_Alias.Version0
                left join fn_GetWindowsServicingLocalizedNames() WSLN
                    On WSS.Name = WSLN.Name
    Where v_FullCollectionMembership_Alias.CollectionID = @CollectionID 
     Order by v_R_System_Valid_Alias.Netbios_Name0

    • Proposed as answer by STHLM Monday, December 2, 2019 4:53 PM
    Thursday, November 28, 2019 8:26 PM
  • It just so happens that the free monthly giveaway is about OS details. You can read more about it here. 

    https://giveaway.enhansoft.com/


    Garth Jones

    Blog: https://www.enhansoft.com/blog Old Blog: https://sccmug.ca/

    Twitter: @GarthMJ Book: System Center Configuration Manager Reporting Unleashed

    Monday, December 2, 2019 5:51 PM