Friday, 6 September 2019

SCCM - SQL Query Server Hardware Inventory With MAC and IP Address

SCCM - SQL Query Server Hardware Inventory With MAC and IP Address



SELECT
A.Name0,
B.SerialNumber0 ,
A.Manufacturer0,
A.Model0,
 C.Name0 ,
D.TotalPhysicalMemory0 ,

MAX (J.MACAddress0) as MAC ,
MAX (F.IPAddress0) As IPAddress ,
G.AD_Site_Name0 ,
MAX (A.UserName0) as Username ,
H.Caption0 ,
H.CSDVersion0,
G.Creation_Date0 ,
I.LastHWScan


FROM
v_GS_COMPUTER_SYSTEM A,
v_GS_PC_BIOS B,
v_GS_PROCESSOR C,
v_GS_X86_PC_MEMORY D,
v_GS_DISK E,
v_GS_NETWORK_ADAPTER_CONFIGUR F,
v_GS_NETWORK_ADAPTER J ,
v_GS_OPERATING_SYSTEM H,
v_GS_WORKSTATION_STATUS I
 INNER JOIN
v_R_System G on G.ResourceID=I.ResourceID


WHERE
A.ResourceID = B.ResourceID AND
A.ResourceID = C.ResourceID AND
A.ResourceID = D.ResourceID AND
A.ResourceID = E.ResourceID AND
A.ResourceID = F.ResourceID AND
A.ResourceID = G.ResourceID AND
A.ResourceID = H.ResourceID AND
A.ResourceID = I.ResourceID AND
A.ResourceID = J.ResourceID AND
H.Caption0 like '%server%'


GROUP BY A.Name0,b.SerialNumber0, A.Manufacturer0, A.Model0, C.Name0, D.TotalPhysicalMemory0, G.AD_Site_Name0, A.UserName0, H.Caption0, H.CSDVersion0, G.Creation_Date0, I.LastHWScan

1 comment:

  1. Very nice article. I enjoyed reading your post. very nice share. I want to twit this to my followers. Thanks!.
    IT asset management

    ReplyDelete

SCCM Configuration Baseline to Initiate Available Task Sequence

 PowerShell Script Monitor Function Get-RegistryValue12 {         param (             [parameter(Mandatory=$true)][ValidateNotNullOrEmpty()]...