Create Dynamic Device collections in SCCM based on a specific string in a system’s computer name

Ever have the need to create a device collection in SCCM that automatically updates it’s membership on a regular basis based on something as simple as what the computer name of a system is?

Use the query below for creating this type of Dynamic Computer Collection based on a string inside the computer name.
Example: If your computers contain SQL string in computer name:

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_SYSTEM on SMS_G_System_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SYSTEM.Name like “%SQL%” order by SMS_R_System.Name

That’s it, you’re done!

– Lots of potential for creating many different device collection based on system naming conventions you may be using at your end.

Advertisements

5 thoughts on “Create Dynamic Device collections in SCCM based on a specific string in a system’s computer name

    • Thanks Josh, I agree, copying and pasting these queries can sometimes include unnecessary spaces and/or other characters which break the query, appreciate the feedback.

  1. This should work:

    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 Name like “%SQL%”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s