Solved

SCCM Collection for servers that do not have KB2286198

Posted on 2010-08-18
2
3,430 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

821 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