Sample Queries for Hardware Inventory in Configuration Manager

The following sample queries demonstrate how to join Configuration Manager hardware inventory views to other views that contain system data. Hardware inventory views use the ResourceID column when joining to other views.

The following query lists all inventoried Configuration Manager client computers and the operating system and service pack that are running on the client computer. The v_GS_OPERATING_SYSTEM hardware inventory view and v_R_System discovery view are joined by using the ResourceID column, and the results are sorted by the computer name.

The following query lists all active Configuration Manager clients that have not been scanned for hardware inventory in more than two days. The v_GS_WORKSTATIONSTATUS hardware inventory view and v_RA_System_SMSInstalledSites discovery view are joined to the v_R_System discovery view by using the ResourceID column.