Create SCCM Collections based on Active Directory OU

Prajwal Desai
Posted by Prajwal Desai

I have been working with a customer who recently added many new OU’s (Organizational Unit) to Active directory. The customer told us to create SCCM collections based on the Active Directory OU. In this post I will cover the steps to create device collections based on AD OU.

To create SCCM collections you require a query. However you can achieve this task using PowerShell as well. In this post I will make the use of Query rule to create device collection.

I have noticed many organizations still use Active Directory groups or Organizational Unit to do operational tasks in SCCM. Even though it’s not efficient method but it’s still used. Once you create the collection, whenever the OU’s are updated with new clients, it would update SCCM collection.

Useful Info – For Windows Server device collection, read this post and for Windows 10 SCCM device collection, refer this post.

Create SCCM Collections based on Active Directory OU

The below procedure shows you how to create the SCCM device collections based on Active Directory OU.

Prerequisites

  • You must have the list of OU names handy. This will help you while creating the device collection.
  • Add the OUs under Active Directory System discovery. This is an important step because the OU’s have to be discovered before you use them in your query.
  • Sufficient permissions to create device collection.

Create SCCM Device Collection

  • In the SCCM console, navigate to Assets and Compliance > Overview > Device Collections.
  • Right click and select Create Device Collection.
Create SCCM Device Collection
Create SCCM Device Collection

On the General page, specify the name of the collection. Click Browse and select Limiting Collection. Click Next.

Specify Device Collection Name
Specify Device Collection Name

On Member Rules page, click Add Rule > Query Rule.

Add Query Rule
Add a Query Rule

Add SCCM Query

On the Query Rule Properties window, type the name of the collection. Ensure the Resource class is System Resource. Click Edit Query Statement.

Create SCCM Collections based on Active Directory OU Snap4

On the Query Statement Properties box, click Criteria tab and click yellow icon.

Create SCCM Collections based on Active Directory OU Snap5

On the Criterion Properties box, click Select button.

Create SCCM Collections based on Active Directory OU Snap6

Select Attribute class to System Resource and Attribute to System OU Name.

Create SCCM Collections based on Active Directory OU Snap7

Set the Operator value to is equal to. Click Value button.

Create SCCM Collections based on Active Directory OU Snap8

Select Active Directory OU

In the Values window, select the Active Directory OU. The SCCM device collection that you create will include all the computers from this OU. Click OK.

Select Active Directory OU
Select Active Directory OU

The criteria that you chose is displayed. Click OK.

Create SCCM Collections based on Active Directory OU Snap10

On the Query Rule properties window, you can now view the query. Click OK.

Create SCCM Collections based on Active Directory OU Snap11

Back to Membership Rules page, click Next.

Create SCCM Collections based on Active Directory OU Snap12

On the Completion window click Close.

Create SCCM Collections based on Active Directory OU Snap13

In the SCCM console, under Device Collections, you should see the OU based collection. You may right click the collection and click Update Membership if you don’t see any member count.

Create SCCM Collections based on Active Directory OU

Share This Article
Prajwal Desai
Posted by Prajwal Desai
Follow:
Prajwal Desai is a Microsoft MVP in Intune and SCCM. He writes articles on SCCM, Intune, Windows 365, Windows Server, Windows 11, WordPress and other topics, with the goal of providing people with useful information.
10 Comments