Partager via


Include/Exclude Collections Rule

My last post on ConfigMgr 2012 Collections (I promise!). I wanted to go over Include and Exclude Collection Rules.

Include and Exclude collection rules are a new feature in ConfigMgr 2012 and I think you’ll find them most useful. They basically allow us to add or remove resources from a collection without having to write a complex membership rule.

Let’s say we have five collections: Finance Accountants, Finance Banking, Finance Bookkeeping, Finance Insurance and Finance Interns. Each of these collections will have their own Deployments targeted at the users in the collections. If we wanted to target an application at all of these collections, we would need to have 5 deployments.

Or we could create a collection with an Include Collection setting

Now we can just target the application at the Finance – All collection and we’ll get all three members.

Exclude collections are even cooler. Let’s say we have a collection for all computers who need Office 2010. Normally we would just deploy our application to the collection and hope for the best. We can use an Exclude Collections rule to be a little smarter in our deployments and remove all clients who are in an ‘unhealthy’ state.

First, we’ll create our Unhealthy Clients Collection. Our membership rule will be any looking for any client who’s client status is NULL or the client activity is NULL. This should get any computer that hasn’t got the client installed, or any computer with the client installed that isn’t active. (this is a *really* basic query for unhealthy clients. You can write a more complex one to find those clients who are truly unhealthy)

I’ve got 4 systems in my lab hierarchy – only one of which is healthy (oh, and the two Unknown Computer objects – but they don’t count)

So when I update the membership of my Office 2010 membership, I will only get the healthy client.

Using this exclusion method has a few benefits – firstly, you have a collection full of systems in which you have to repair the ConfigMgr client. Secondly, you’re software deployment statistics should be a lot cleaner as you’re not getting failures on the unhealthy clients. Finally, as the collection is dynamic, as soon as you remediate the unhealthy clients, they will receive the Office 2012 deployment!

Matt Shadbolt

Comments

  • Anonymous
    August 08, 2012
    Hi Matt Thanks for the post - just a minor thing which doesn't affect the content of the posting, but noticed you said about the Office 2010 membership, then in the image you have Install Office 2012, and the last paragraph has Office 2012 listed too. Regards John

  • Anonymous
    November 18, 2015
    Very nice!
    Is there a direct rule I can implement to exclude one computer from a collection? I don't want this one getting Windows Updates.

    • Anonymous
      October 26, 2016
      Yes just create a collection with just that one computer then add this collection as an Exclude Collections Rule to any collection(s) that contain(s) the device. This will negate that machines membership.
  • Anonymous
    June 08, 2017
    If I exclude a test collection from All workstations collection - a circular dependency is created, all devices in Test collection will not get deployments on All workstations collection. What If I want resume deployments to such excluded devices in Test collection?

    • Anonymous
      June 14, 2017
      You either remove those devices form the Test collection, or remove the exclude rule. Matt