Why Are Dynamic Collections So Cool? How to Create/Filter a Collection Based Off Naming Standards for Windows 10 Machines
By Model Technology Solutions
Published July 8, 2021
Estimated Reading Time: 3 minutes

Collections in SCCM are great! The Microsoft definition of a collection is as follows:

Collections are groupings of users or devices. [You] Use collections for tasks like managing applications, deploying compliance settings, or installing software updates. You can also use collections to manage groups of client settings or use them with role-based administration to specify the resources that an administrative user can access. Configuration Manager contains several built-in collections.1

But in many situations, dynamic collections are better. Dynamic collections will update or refresh the members based on a set of rules or query that you set. This can be helpful because devices can be added to the collection as conditions change. Dynamic collections are the same thing as an explicit member collection so they can can be used to:

  • Deploy software
  • Complete software updates
  • Establish security baselines

…or simply for administrative purposes.

This short article will introduce you to building a dynamic collection based off of your naming standards (ComputerName). This can be helpful if your devices are named after a physical location or a site prefix. As devices get renamed, rebuilt, or moved, the collection will remain accurate.

While this is an introduction to dynamic collections, the possibilities of what to query (including completely custom attributes) are numerous and are out of scope for this particular blog article.

How To Build A Dynamic Collection

Environment:

  • Server names are as follows: TMSModel01, MINModel01, RMDModel01
  • Computers that connect to these servers are named with the same prefixes, e.g., TMS, MIN, RMD (TMS1itach, MINwe12, RMDhop21)

Objective:

  • We want to pull every machine that connects to the servers listed above to a collection
  • We want the flexibility to edit the Prefixes to where you can change them, add them, or remove them

First, in ‘Device Collections’, right click ‘Device Collections’ and select ‘Create Device Collections’

Once the Create Device Collection Wizard appears, name the collection appropriately. In our case we used a very detailed naming standard such as ‘All Windows 10 Connecting to Server MINModel01, TMSModel01, RMDModel01′.

Next, provide a limiting collection. For example, ‘All Windows 10 Systems’ (which will need to be created) or you can use ‘All Systems’. In our case since the devices we are looking for are all Windows 10, we selected ‘All Windows 10 Systems’.

Keep in mind there are many considerations for choosing what the limiting collection should be, but I’ll cover those in a different blog!

Next, to access the membership rules, click ‘Add Rule’. You will be given options. Select ‘Query Rule’.

Once you’re inside the query rule option:

1. Name the Query Rule (ex. Win10 Prefixes)

2. Click ‘Edit Query Statement’

3. Click ‘Show Query Design’ and enter this 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 “TMS%” or SMS_R_System.Name like “MIN%” or SMS_R_System.Name like “RMD%”

OR you can hit the new query rule, e.g. the yellow star.

Make these selections and add this information:

  • Criterion Type: Simple Value
  • Where: Hit Select…
    • Attribute class: System Resource
    • Attribute: Name
  • Operator: Select “Is Like”
  • Value: MIN%

Repeat this process for the other prefixes you are looking for.

And here are our finished collection results!

Congratulations! You’ve set up a dynamic collection!

Post Tags:
Article By Model Technology Solutions
We’re a Microsoft Partner with multiple Gold and Silver proficiencies. Our team has decades of combined experience helping companies like yours in diverse industries to drive their digital transformations using Microsoft’s powerful solution set.

Related Posts