Solved

SCCM Collection for servers that do not have KB2286198

Posted on 2010-08-18
2
3,163 Views
Last Modified: 2013-11-21
I can easily create a collection of servers which have KB2286198

What I cannot figure out how to do (and always have this problem with SCCM) is how to create collections based on something a server DOES NOT HAVE

if I create a query which says "Add/Remove Programs - Display Name is equal to Security Update for Windows Server 2003 (KB2286198)" then it finds all the servers which have this patch installed

If I create a query which says "Add/Remove Programs - Display Name is NOT equal to Security Update for Windows Server 2003 (KB2286198)" then it just lists every server I have including those that have this hotfix.

I presume it is doing this because it is finding instances of Add/Remove Programs - Display Name which do not equal KB2286198

SCCM does not give me the option to chose "does not contain" which would make a whole lot more sense to me

So how am I supposed to create collections (using the gui cos I can't write queries from scratch - I can edit them fine) of servers which DO NOT CONTAIN certain operator/values

Stu
0
Comment
Question by:itinfserv
2 Comments
 
LVL 1

Author Comment

by:itinfserv
ID: 33462868
This is the query language for the collection that DOES have the patch installed


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 inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName = "Security Update for Windows Server 2003 (KB2286198)"

Open in new window

0
 
LVL 6

Accepted Solution

by:
Exemplar earned 500 total points
ID: 33468613
Hello Stu!

Here is how I do it and it almost always works adequately for me.  Using a scenario similar to this should give you what you're looking for:

Starting with the generic ConfigMgr Collections "All Windows Servers" and "All Windows Servers with KB2286198"

Step 1.  Create a Collection called:  "All Windows Servers without KB2286198"

Step 2.  The WQL query that I would use on "All Windows Servers without KB2286198" Collection is:
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 ResourceId not in (select ResourceID from SMS_CM_RES_COLL_????????)

Step 3.  Notice the "????????" in the query.  You need to insert the Collection ID from the Collection "All Windows Servers with KB2286198"

Step 4.  Choose to 'Limit to collection' (should be the same collection limiting as "All Windows Servers with KB2286198") and identify you all servers collection for this example it would be "All Windows Servers"

This should now give you a new Collection ("All Windows Servers without KB2286198") that identifies all servers NOT listed in the "All Windows Servers with KB2286198".  This should be what you are looking to accomplish.

An easy way to test the validity of this is to note the total of systems listed in the "All Windows Servers" collection.  Then combine the totals from "All Windows Servers with KB2286198" and "All Windows Servers without KB2286198" -- which should be the same amount as the total from "All Windows Servers".

I hope this helps.

/cheers
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

The question has been asked on multiple occasions as to how best to do printing in a remote desktop or terminal services environment.   It seems that this particular question has plagued several people and most especially as Terminal Services, as…
Welcome to my series of short tips on migrations. Whilst based on Microsoft migrations the same principles can be applied to any type of migration. My first tip is around source server preparation. No migration is an easy migration, there is a…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now