Jump to content


  • 0
wmmayms

Collection: All Computers that don´t have a specific application installed

Question

As you might have seen it dosen´t work to create a query like this. All computer would still show up since they have other rows in Add/Remove programs which is not equal to "Adobe Reader 7.0"

post-2500-1238483517_thumb.jpg

 

Requirements:

If you are using SMS 2003 you need to add extended node information before you can complete this guide. I will post a topic on how to enable this (and if i forget you can just use google to find out how to enable this option.)

If you are using SCCM 2007 it will work out of the box.

 

Well here is how to create a collection that contains all computer who does not have a spesific application (in my case: "Adobe Reader 7.0") in Add/Remove programs:

First we need to create a collection that contains all computer who HAS "Adobe Reader 7.0" installed

 

1. Rightclick and choose to create a new collection:

post-2500-1238483852_thumb.jpg

 

2. Name you collection: All Computer who has <application name> (in my case: Adobe Reader 7.0)

post-2500-1238483999_thumb.jpg

 

3. Click membership Rules tab and change the schedule to once every 15min

post-2500-1238484112_thumb.jpg

 

4 Create a new query and give it the same name as you named your collection:

post-2500-1238484206_thumb.jpg

 

5. Click "Edit query Statement" then choose the tab "Criteria"

post-2500-1238484280_thumb.jpg

 

6. Create a new Criteria

post-2500-1238484465_thumb.jpg

 

7. Click Select, you will now see this window:

post-2500-1238484569_thumb.jpg

 

8. Enter the following into the fields then click OK:

Attribute Class: "Add/Remove Programs"

Alias as: <No Alias> (leave it as it is)

Attribute: "Display name"

post-2500-1238484713_thumb.jpg

 

9. Operator should be: "is equal to"

 

10. Value should be equal to the application you want to query (my case: "Adobe Reader 7.0" )

post-2500-1238484856_thumb.jpg

 

If you are hardcore here is the wql code for the above sample:

select *  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 = "Adobe Reader 7.0"

 

11. If you click OK in all windows, you should now have a collection containing all computer who has Adobe Reader 7.0 which update automaticly every 15min

This is how it look in one of my enviroments:

post-2500-1238485112_thumb.jpg

 

Now it is time to create a collection containg all the computer who does not have Adobe Reader 7.0 (which means all computer who are not in the collection we created above)

 

1. Create a new collection just like we did above.

Name it "All Computers who DOES not have <application name>"

Set it to update every 15min

 

2. Create a new query under "membership rules" tab

Name it: "All Computer who DOES not have Adobe Reader 7.0"

Click "Edit Query Statement"

 

3. Click Criteria Tab and create a new Criteria:

Choose Crition Type = "Subselected values"

post-2500-1238485812_thumb.jpg

 

4. Press "select"

Attribute class: = "System Resource"

Alias: = <No Alias> (leave it as it is)

Attribute: "Resource ID"

post-2500-1238486113_thumb.jpg

When information is enterd press OK

 

5. Change operator to: "is not in"

post-2500-1238486228_thumb.jpg

 

6. Enter the following query code into the subselect box:

select ResourceID from SMS_CM_RES_COLL_[color="#FF0000"][b]<CollectionID>[/b][/color]

 

<CollectionID> should be equal to the collection ID of the collection you created first at the top "All Computer who has Adobe Reader 7.0"

In SCCM you can find this by looking under the General tabb of the properties of this collection. In SMS you need extended node information or use a report to find this information. Report 139 (All collections) can be used to find the correct collection ID.

 

This is how it should look:

post-2500-1238486857_thumb.jpg

 

7. Click Ok everywhere.

 

You now have a collection that displays all computer who are not in the collection "All Computer who has Adobe Reader 7.0".

This means we can now see all computer who does not have Adobe Reader 7.0 Installed.

 

In my case it looked like this:

post-2500-1238487156_thumb.jpg

 

This is the core query used in the second collection (don´t forgett to change the collectionID at the end of it.):

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_PE10008D)

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.