Create SCCM Collections based on Active Directory OU

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.

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

On the Criterion Properties box, click Select button.

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

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

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.

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

Back to Membership Rules page, click Next.

On the Completion window click Close.

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

Related Posts
guest
0 Comments
Inline Feedbacks
View all comments

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More