SCCM SQL Query for all server CPU information

If you need to report on server CPU information from your System Center Configuration Manager database, this query pulls together the make, model, operating system, architecture, CPU model, and core/logical processor counts for every server in your hardware inventory. This is useful for things like core-based licensing planning, hardware refresh scoping, or just getting a […]

SCCM SQL Query For All Server Cpu Information
If you need to report on server CPU information from your System Center Configuration Manager database, this query pulls together the make, model, operating system, architecture, CPU model, and core/logical processor counts for every server in your hardware inventory. This is useful for things like core-based licensing planning, hardware refresh scoping, or just getting a quick inventory snapshot without opening the console. You can adapt the SELECT list to bring back additional columns, or swap it for SELECT * if you want everything the view offers.

SQL Query

SELECT
DISTINCT(CPU.SystemName0) AS [System Name],
CS.Manufacturer0 AS [Make],
CS.Model0 AS [Model],
OS.Caption0 AS [Operating System],
CS.SystemType0 AS [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 LIKE '%server%'
GROUP BY
CS.Manufacturer0,
CS.Model0,
OS.Caption0,
CS.SystemType0,
CPU.SystemName0,
CPU.Name0,
CPU.NumberOfCores0,
CPU.NumberOfLogicalProcessors0
ORDER BY [System Name] ASC
Run this from SQL Server Management Studio against your ConfigMgr database (read-only access is enough), or drop it straight into an SSRS or Power BI report as a dataset.

More Queries

Our full range of SQL and WQL collection queries is available on the site if you’re after more reports like this one.

Feedback

If you have any questions or feedback about this post, or if you would like us to create any queries for you, please go ahead and leave us a message below in the comments section and we will get back to you as quick as we can.

Resources

SQL CPU Information

Discover more from TechyGeeksHome

Subscribe to get the latest posts sent to your email.

Andrew Armstrong

Andrew Armstrong is a UK-based IT professional with 26+ years of hands-on experience in Windows, Windows Server, SCCM/ConfigMgr, Active Directory, PowerShell, and enterprise infrastructure.

He founded TechyGeeksHome in 2010 and has published over 1,500 practical guides covering real-world IT problems and solutions. When not solving IT problems,

Andrew develops free Windows utilities including Ultimate Settings Panel, which has been downloaded over 850,000 times.