Thursday, June 1, 2023

SCCM Report for computer Name and Mac Address

 

                    SCCM Report for computer Name and Mac Address


In this blog post, we will explore how to generate a System Center Configuration Manager (SCCM) report that provides computer names and MAC addresses. The ability to obtain computer names and MAC addresses is essential for network troubleshooting, asset management, and inventory tracking. Here is SCCM Query...



SELECT

    SubQuery.ComputerName,

    SubQuery.MACAddress

FROM

    (

        SELECT

            CS.Name0 AS 'ComputerName',

            MAC.MACAddress0 AS 'MACAddress',

            ROW_NUMBER() OVER (PARTITION BY MAC.MACAddress0 ORDER BY MAC.Index0 DESC) AS RowNum

        FROM

            v_GS_COMPUTER_SYSTEM CS

            JOIN v_GS_NETWORK_ADAPTER MAC ON CS.ResourceID = MAC.ResourceID

        WHERE

            MAC.MACAddress0 IS NOT NULL

            AND MAC.MACAddress0 != ''

    ) SubQuery

WHERE

    SubQuery.RowNum = 1