Queries

Queries, which are discussed in Chapter 17, “Configuration Manager Queries,” request information from the ConfigMgr database. Specifying criteria in a query returns a filtered result of objects. Queries in ConfigMgr are written in WMI Query Language (WQL) and can return results from hundreds of different attribute classes ranging from inventory data to sites. Here is an example of a typical query to return devices with 1GB of RAM or greater:

select     SMS_R_System.Name,     SMS_G_System_X86_PC_MEMORY.TotalPhysicalMemoryfrom     SMS_R_System     inner join SMS_G_System_X86_PC_Memory on     SMS_G_System_X86_PC_Memory.ResourceID = SMS_R_System.ResourceIdwhere     SMS_G_System_X86_PC_Memory.TotalPhysicalMemory > 1048000

Get System Center 2012 Configuration Manager Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.