Category: WQL/WMI

  • Example WQL Queries for Configuration Manager

    Example: Computers that run Windows 7 Use the following query to return the NetBIOS name and operating system version of all computers that run Windows 7. Tip: To return computers that run Windows Server 2008 R2, change %Workstation 6.1% to %Server 6.1% SELECT * FROM SMS_R_System WHERE OperatingSystemNameAndVersion LIKE ‘%Workstation 6.1’ Example: Computers with a…

  • Collection Query for Hostname starting with

    select * from SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.Name like “ALM%”

  • System: Application Name & Version

    select SMS_R_System.ResourceId, SMS_R_System.ResourceType, SMS_R_System.Name, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.Client from SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like “%XXX%” and SMS_G_System_ADD_REMOVE_PROGRAMS.Version < “11.0.10” order by SMS_R_System.Name

  • WMI Queries

    root\cimv2SELECT * FROM Win32_ComputerSystem WHERE Manufacturer LIKE “%DELL%” root\cimv2SELECT * FROM Win32_ComputerSystem WHERE Model LIKE “%CF-53%” root\cimv2SELECT * FROM Win32_BaseBoard WHERE Product LIKE “%P5B-TMX%” root\cimv2SELECT * FROM Win32_ComputerSystem WHERE Systemtype LIKE “%x64%” Quick check run -> wmic baseboard get product,manufacturer-> wmic computersystem get model,name,manufacturer,systemtype-> wmic diskdrive get model