Sometimes you might like to make a dynamic SCCM collection that contains all computers with specific characters in their names. For example, you might want a collection to apply to all computers that have a particular number in their names, or avoid computers with particular letters that denote that it’s a special computer. You may wish to stagger deployments to a series of collections based on their name.
Here’s a query to make a dynamic SCCM collection based on computer name:
Do a new membership rule for the collection (under properties), add a query and use this SQL query:
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 ‘%xxxxx%’
Replace xxxxx with the characters you want to be in the computer names that will populate the dynamic collection.