Thursday, March 27, 2014

SCCM collection query computer name



The following WQL query will add the machines to a collection based on their naming conventions. This query is useful if we want to add only some machines to a collection using WQL query based on the computer starting names (ABC-XXXX) or machines named using business unit (HR-XXXXXX).

Change the values ( ABC and DEF ) as your requirements.
*********************************************************************************
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 where SMS_R_System.Name like "%HR%" or SMS_R_System.Name like "%ABC%" or SMS_R_System.Name like "%DEF%"
*********************************************************************************
More WQL queries can be found here

5 comments: