Chris Miller
asked on
SCCM Collection Query
I need to build a collection based on software or a service NOT being installed or running.
The software is McAfee HIPS and the service is firesvc.exe.
How do I create this collection?
The software is McAfee HIPS and the service is firesvc.exe.
How do I create this collection?
Also to answer your NOT running part. Just change the Status to not equal OK
select SMS_R_System.ResourceId, SMS_R_System.ResourceType, SMS_R_System.Name, SMS_R_System.SMSUniqueIden tifier, SMS_R_System.ResourceDomai nORWorkgro up, SMS_R_System.Client from SMS_R_System inner join SMS_G_System_SERVICE on SMS_G_System_SERVICE.Resou rceID = SMS_R_System.ResourceId where SMS_G_System_SERVICE.PathN ame like "%firesvc.exe%" and SMS_G_System_SERVICE.Start Mode = "Auto" and SMS_G_System_SERVICE.Statu s != "OK"
select SMS_R_System.ResourceId, SMS_R_System.ResourceType,
ASKER
I like that query but I am wanting to know which computers that it is NOT running on.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Edit to the above Query 2. When telling it to return StartMode and Status it gives false positive results so leave that out and just return the computer name.
select distinct SMS_R_System.Name from SMS_R_System where SMS_R_System.Name not in (select distinct SMS_R_System.Name from SMS_R_System inner join SMS_G_System_SERVICE on SMS_G_System_SERVICE.Resou rceId = SMS_R_System.ResourceId where SMS_G_System_SERVICE.PathN ame like "%firesvc.exe%")
select distinct SMS_R_System.Name from SMS_R_System where SMS_R_System.Name not in (select distinct SMS_R_System.Name from SMS_R_System inner join SMS_G_System_SERVICE on SMS_G_System_SERVICE.Resou
ASKER
Ok, I think I did this right. I also followed the instructions from the link above.
I need to spot check but so far it looks good.
I need to spot check but so far it looks good.
ASKER
If I use your " Edit to the above Query 2 ", I get false positives.
If I follow the instructions from the link it looks like it is showing correctly.
I chose a computer from the Query 2 and it showed having HIPS installed and the query I created from the link instructions doesnt show that same computer in its list.
If I follow the instructions from the link it looks like it is showing correctly.
I chose a computer from the Query 2 and it showed having HIPS installed and the query I created from the link instructions doesnt show that same computer in its list.
ASKER
Here is the query from the instructions link.
select SMS_G_System_SYSTEM.Name from SMS_R_System inner join SMS_G_System_SYSTEM on SMS_G_System_SYSTEM.Resour
The reason that I had to modify my second query was that I was trying to show the StartMode and Status of the service. The only issue with doing this is if HIPS isn’t installed the service doesn’t exist. By removing the two extra display fields the query only reports computer names that are not in the results of Query 1. Actually if you follow the instructions linked and replace msaccess.exe with Firesvc.exe you will get the results that you are looking for.
Sorry for all the confusion.
Sorry for all the confusion.
ASKER
Ok, Thanks.
ASKER
quick question. If I have a computer that hasnt done a hardware & software scan in a couple of days how do I get that computer to do one instantly.
If you download the SCCM Client Center (awesome tool by the way) you can initiate a hardware & software inventory at will remotely on a single computer by connecting to it then drop down "Client Actions" and select what discovery cycle you want to run.
http://sourceforge.net/projects/smsclictr/
The other way is on the client itself go to the Control Panel - Configuration Manager then on the actions tab initiate a hardware inventory cycle and likewise the software inventory cycle.
http://sourceforge.net/projects/smsclictr/
The other way is on the client itself go to the Control Panel - Configuration Manager then on the actions tab initiate a hardware inventory cycle and likewise the software inventory cycle.
ASKER
Cool thanks.
select SMS_R_System.ResourceId, SMS_R_System.ResourceType,
You can see this information on individual computers by starting the Resource Explorer then expanding Hardware and clicking on the Services option.