Create SCCM Collections Based on the Direct Membership Rule

Let’s see how to Create an SCCM Collections Based on the Direct Membership Rule. Direct membership rules can be scripted using automation via PowerShell or admin services.

SCCM Collections are critical in the SCCM environment. We should be careful when creating or modifying collections, as they can cause performance issues.

I have a couple of posts about How to create collections (static and dynamic) in this series of posts. This post is part of the SCCM Education series of posts! In this post, we will discuss SCCM collections (static).

Video Tutorial – How to Create Static SCCM Collection

The video tutorial below explains more details about identifying built-in collections. It also describes other different types of groups in SCCM.

Patch My PC
Create SCCM Collections Based on the Direct Membership Rule – Video 1

What are SCCM Collections?

Collections help you to organize SCCM resources. The SCCM resources in this context are devices and users. You can manage or tag SCCM resources into manageable units using the Collection.

Collections = Manageable Units

Adaptiva

Collections can be created to match your client management requirements. These collections can be used to perform operations on multiple resources simultaneously.

SCCM Resources = Devices & Users

What are the Types of SCCM Collections?

This question is tricky. I can’t claim that I’m giving you the correct answer, but here are my thoughts: There are two types of collections: Built-in collections and Custom collections.

  • SCCM admins create custom collections.
  • Built-in collections are out-of-box collections that will already exist when you install an SCCM environment.
Create SCCM Collections Based on the Direct Membership Rule - Fig.1
Create SCCM Collections Based on the Direct Membership Rule – Fig.1

We have other types of collections: static collections and dynamic collections. The static collection SCCM is explained in the section below this post.

  • Built-in Collections = Collections created at the time of SCCM installation
  • Custom Collections = Created by SCCM Admins

What are User and Device SCCM Collections?

Device and User collections are two different types of collections. Device collections are only for managing devices, while user collections are for managing users.

We can’t add user resources to the device collection and device resources to the user collection. A group can contain users or devices. However, a collection cannot have both users and devices. Static collection SCCM is explained in the section below of this post.

  • User Collection = Only for Users
  • Device Collection = Only for Devices

What are the types of SCCM Collection Membership rules?

The membership rules are the brain of the Collection. They define each Collection’s character and which users or Devices should be part of it.

Depending on the logic in the membership rule, a device or user will be added to a particular collection. The section below explains Static Collection SCCM.

Members of a collection are specified using direct rules, query rules, or both.

Following are the Membership Rules

  1. Direct rule – Choose the users or computers you want to add to a collection. This membership does not change unless you remove a resource from SCCM.
  2. Query rule – Dynamically update the membership of a collection based on a query that SCCM runs on a schedule.
  3. Include the collection rule– Include other collection members in an SCCM collection.
  4. Exclude collection rule – The exclude collection rule lets you exclude the members of another collection from an SCCM collection.
Create SCCM Collections Based on the Direct Membership Rule - Fig.2
Create SCCM Collections Based on the Direct Membership Rule – Fig.2

What is Static SCCM Collection?

There are two types of Collections in SCCM. Built-in and custom collections are those two(2) types of collections. We can’t edit or change the built-in collections. However, we can create custom collections as per our business requirements.

I don’t recommend creating two(2) separate Install and Uninstall collections for each application.

Try to avoid creating many loads of collections; this could impact the entire SCCM environment’s performance. We can discuss Collection Best Practices in next week’s post.

There are two(2) types of collections in Custom Collections. Static collections and Dynamic collections are those two types of collections. In this post, we will discuss the Static Collection in SCCM. Members of a collection are specified using direct rules, query rules, or both.

Static collection SCCM is a group of devices or users that won’t change dynamically. The static Collection uses direct membership rules, and the direct membership rule defines a specific resource.

The members of the static Collection will remain CONSTANT unless there is immediate action to change the membership. We can manually or programmatically adjust the members of the Collection. But SCCM won’t change it automatically.

  • Static Collection = Direct Membership Rule

How to Create Static SCCM Collections?

As I explained in the video tutorial, you need to use a direct membership rule to create a static collection. In the following sections, I will explain how to develop Static Collections in SCCM. You can use the same method to develop direct Device and static User collections.

Navigate to the SCCM console, Assets and Compliance, Device Collections. Right-click and select “Create Device Collection” from the Device Collections node.

On the General page, provide a Name and a Comment. Then, in Limiting Collection, choose Browse to select a limiting collection. The Collection will only contain members from the Limiting Collection.

Create SCCM Collections Based on the Direct Membership Rule - Fig.3
Create SCCM Collections Based on the Direct Membership Rule – Fig.3

On the Membership Rules page of the Create Device Collection Wizard, select the type DIRECT membership rule for this Collection in the Add Rule list. You can configure multiple rules for each Collection.

Select Direct Rule in the Add Rule list on the Membership Rules page of the Create Device Collection Wizard.

Create SCCM Collections Based on the Direct Membership Rule - Fig.4
Create SCCM Collections Based on the Direct Membership Rule – Fig.4

Create Direct Membership Rule Wizard

Let’s Create a Direct Membership Rule now using the following wizard. On the Search for Resources page of the Create Direct Membership Rule Wizard, specify the following information: 7-11 steps.

Check the drop-down options for the Resource class: Select the type of resource you want to search for and add it to the Collection.

  • Select from System Resource values to search for inventory data returned from client computers.
  • Check the drop-down options for Attribute name: Select the attribute associated with the selected resource class that you want to search for.
Create SCCM Collections Based on the Direct Membership Rule - Fig.5
Create SCCM Collections Based on the Direct Membership Rule – Fig.5

NOTE! If you want to select computers by their NetBIOS name, select System Resource in the Resource class list and NetBIOS name in the Attribute name list.

I didn’t select the option. But I would recommend testing this in your environment before choosing this option. Select Exclude resources marked as obsolete – If a client computer is marked as outdated, do not include this value in the search results.

I didn’t select this option, but if it’s required for your environment, feel free to use it. Exclude resources that don’t have the SCCM client installed—they won’t be displayed in the search results.

Enter the Value: Enter a value for which you want to search the selected attribute name. You can use the percentage character as a wildcard. For example, to search for computers with a NetBIOS name beginning with “Win11”, enter Win11% in this field.

Create SCCM Collections Based on the Direct Membership Rule - Fig.6
Create SCCM Collections Based on the Direct Membership Rule – Fig.6

Select Resources, select the resources you want to add to the Collection in the Resources list and then choose Next.

Create SCCM Collections Based on the Direct Membership Rule - Fig.7
Create SCCM Collections Based on the Direct Membership Rule – Fig.7

Click on Close to complete the Create Direct Membership Rule Wizard.

Create SCCM Collections Based on the Direct Membership Rule - Fig.8
Create SCCM Collections Based on the Direct Membership Rule – Fig.8

Click on the Next, Next, and Close buttons to complete the creation of the static Collection with the direct membership rule.

Create SCCM Collections Based on the Direct Membership Rule - Fig.9
Create SCCM Collections Based on the Direct Membership Rule – Fig.9

How to Manually add a Device or a User to Static Collection in SCCM?

Now, let’s see the easiest way to add additional or new devices to a static collection using the direct membership rule.

Right-click on the Device or user you want to add to an existing device or user collection. Click on the option called “Add Selected Items.”

Create SCCM Collections Based on the Direct Membership Rule - Fig.10
Create SCCM Collections Based on the Direct Membership Rule – Fig.10

Select the following option depending on “Add Selected Items to Existing Device Collection” or “Add Selected Items to Existing User Collection.”

Create SCCM Collections Based on the Direct Membership Rule - Fig.11
Create SCCM Collections Based on the Direct Membership Rule – Fig.11

Best Practices – Static or Direct Membership Rule-based SCCM Collections

Wait for 2-3 minutes to get members populated in the Collection. Don’t take any actions like Update Membership or Refresh immediately after collection creation.

Do not use the “Use Incremental updates for this collection” option for static collections. There is no need to enable it —”Schedule a full update on this collection.” I don’t think this option makes much sense for a fixed group.

ConfigMgr Collection Full Incremental Evaluation Status Summary from Console | SCCM or Check and evaluate your collections with the Collection Evaluation Viewer tool  https://www.anoopcnair.com/collection-evaluation-viewer

Resources

We are on WhatsApp. To get the latest step-by-step guides and news updates, Join our Channel. Click here –HTMD WhatsApp.

Author

Anoop C Nair is Microsoft MVP! He is a Device Management Admin with more than 20 years of experience (calculation done in 2021) in IT. He is a Blogger, Speaker, and Local User Group HTMD Community leader. His primary focus is Device Management technologies like SCCM 2012, Current Branch, and Intune. He writes about ConfigMgr, Windows 11, Windows 10, Azure AD, Microsoft Intune, Windows 365, AVD, etc.

5 thoughts on “Create SCCM Collections Based on the Direct Membership Rule”

  1. Hi, I am Yvan from France.
    I have a question for this advice above mentionned. We have added a computer name in static collection (Direct rule) and recently we have renamed the AD’s computer name. With a DDR, the computer name has been good changed in SCCM. However, the older computer name is always there in the direct membership rules… Would you have a idea for this issue ? thank you so much.

    Reply
    • can you see both the records in SCCM console all devices collection? If so, Have you tried to delete the old one from there ? And even after deleting, you can see that old record in your direct membership rule?

      Reply
      • Hello, after DDR evaluation, the older computer name isn’t in collections anymore but appears in Membership rules only when this a direct rule type. It’s very Strange… May be that it seems the Membership rules tab don’t apply it update.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.