Forums on Intune, SCCM, and Windows 11

Welcome to the forums. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your topics and posts, as well as connect with other members through your own private inbox!

SOLVED SQL Reporting Issue

  • Thread starter Thread starter Nav4339
  • Start date Start date
  • Replies Replies 3
  • Views Views 541
Status
Not open for further replies.

Nav4339

Well-Known Member
Messages
82
Reaction score
3
Points
8
I am using the query below to extract some details for devices in my environment. My issue is that I have a number of devices that x86 OS installed on a x64 Machine. My query returns the result correctly for the OS showing it as x86 OS. However for the machine/processor, it display it as x86 based PC when it is in fact a x64 processor. Is there any way to get around this and getting the reporting issue resolved. The device has been deleted from SCCM, client re-installed, all policies re-run. After 1 week, the results are still the same.

SELECT DISTINCT
CPU.SystemName0 AS [Computer Name],
CS.Manufacturer0 AS [Make],
CS.Model0 AS [Type],
OS.Caption0 AS [Operating System],
OS.BuildNumber0 AS [OS Build Number],
OS.Version0 AS [OS Version],
CS.SystemType0 AS [System Type],
OS.OSArchitecture0 AS [OS Architecture],
CPU.Name0 AS [CPU Model],
COUNT(CPU.ResourceID) AS [Number of CPUs],
CPU.NumberOfCores0 AS [Number of Cores per CPU],
CPU.NumberOfLogicalProcessors0 AS [Logical CPU Count]
FROM
[dbo].[v_GS_PROCESSOR] CPU
LEFT OUTER JOIN dbo.v_GS_COMPUTER_SYSTEM CS ON CS.ResourceID = CPU.ResourceID
LEFT OUTER JOIN dbo.v_GS_Operating_System OS ON CS.ResourceID = OS.ResourceID
WHERE
OS.Caption0 NOT LIKE '%server%'
GROUP BY
CS.Manufacturer0, OS.BuildNumber0, OS.Version0,
CS.Model0, OS.Caption0, OS.OSArchitecture0,
CS.SystemType0, CPU.SystemName0, CPU.Name0,
CPU.NumberOfCores0, CPU.NumberOfLogicalProcessors0
ORDER BY
[Computer Name] ASC;

Result from Query
1724333339925.png
Confirmation from physical device
1724333401895.png
 
Last edited:
Your query does not show the cpu type. It shows the system type. Look within resource explorer for the correct column to use.
 
Status
Not open for further replies.
Back
Top