Posts

Showing posts with the label SQL

SCCM Hardware inventory custom queries 2 ( Specified RAM, Hard Drive details)

Image
 The SQL query provided in this post is designed to extract a wealth of information from your SCCM database. Here’s a breakdown of what it does: Hostname and Model Information: Retrieves the NetBIOS name (hostname) and the model of each PC. Operating System Details: Fetches the OS version and build number, which is essential for ensuring compliance and identifying systems that need updates. Processor Information: Gathers details about the processor, including its name, number of cores, and logical processors. Memory Configuration: Concatenates information about all RAM slots, including capacity, type, and bus speed, providing a complete picture of the system’s memory configuration. Storage Details: Retrieves information about the type and model of each drive, as well as the total and free space on each logical disk. Total Memory and Disk Size: Ca...

SCCM Hardware inventory custom queries 1

Image
 The following SQL query retrieves key details that most customers commonly request: Computer Name and Organizational Unit (OU) Client Status (Active/Inactive) Processor and Memory Details Last Logged-On User Last Hardware Scan Date Operating System Version and Build Logical Disk Details (Total and Free Space)   SELECT DISTINCT     s.Name0 AS ComputerName,     MAX(v_RA_System_SystemOUName.System_OU_Name0) AS 'Computer OU',     CASE         WHEN cs.ClientActiveStatus = 1 THEN 'Active'         ELSE 'Inactive'     END AS 'ActiveClient',     cp.name0 AS [Processor Name],      v_GS_COMPUTER_SYSTEM.UserName0 AS 'Last Logged-On User',     v_GS_WORKSTATION_STATUS.LastHWScan,     os.Caption0 AS 'OS Version',  ...