SCCM Collection (Tested with 2012, SP1 CU2)
Software inventory must ben enabled and running. Instructions found here:
http://technet.microsoft.com/en-us/library/hh509028.aspx
Change the "6.%" to "7.%", "8.%" etc. to get the different versions.
Language: WQL
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_SoftwareFile on SMS_G_System_SoftwareFile.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SoftwareFile.FileName = "iexplore.exe" and SMS_G_System_SoftwareFile.FilePath like "%prog%internet%" and SMS_G_System_SoftwareFile.FileVersion like "6.%"
how can I run this in SCCM 2012r2? Not sure where to start?
ReplyDeleteThese are device collection quieries - in the SCCM Console > Assets and Compliance > right click Device Collections > Create Device Collection. Give the Device collection a Name and (optional) comment, choose a limiting collection ( I have one I use called All Workstation or Professional Systems). Click OK then Next.
DeleteIn the Membership rules click Add Rule, select Query Rule.
Give the Query a name and click Edit Query Statement. On the next popup window click Show Query Language (bottom left). Paste the WQL language into the Query Statement section. Overwrite what is there. Follow the prompts until complete (it's fairly straightforward)
Hi, can this run in SCCM 2007 (not R2)?
ReplyDeleteNot sure. It is WQL so it probably will. no harm in creating a collection and attempting to use it - if it is not the correct syntax you will not get any results returned.
DeleteThis works well apart from the double results due to IE 32 bit and IE 64 bit program folders on 64 bit machines. Might just need to adjust the query if you are running in a 64bit only environment which most probably are these days.
ReplyDeleteAre you getting the computers listed twice in the collection? can you send me a screen shot of this? I would love to see it.
Deleteselect DISTINCT SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,
DeleteSMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,
SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_SoftwareFile on SMS_G_System_SoftwareFile.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SoftwareFile.FileName = "iexplore.exe" and SMS_G_System_SoftwareFile.FilePath like "%prog%internet%" and SMS_G_System_SoftwareFile.FileVersion like "6.%"
yes, just adjust the query so it is "%program files\%internet%" and this solves the double reports.
ReplyDeleteWhen I try to adjust it to that, I get a syntax error. Any ideas?
Deleteselect 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_SoftwareFile on SMS_G_System_SoftwareFile.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SoftwareFile.FileName = "iexplore.exe" and SMS_G_System_SoftwareFile.FilePath like "%program files\%internet%" and SMS_G_System_SoftwareFile.FileVersion like "10.%"
if you use my original script, does the collection query properly?
Deleteyour script works great. It saved me a ton of work.
ReplyDeleteFYI. You can return two versions or more if needed by adding an or statement. I still get the double results as well. Query language is listed below.
ReplyDeleteselect SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,
SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,
SMS_R_SYSTEM.Client, SMS_G_System_SoftwareFile.FileVersion from SMS_R_System inner join SMS_G_System_SoftwareFile on SMS_G_System_SoftwareFile.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SoftwareFile.FileName = "iexplore.exe" and SMS_G_System_SoftwareFile.FilePath like "%prog%internet%" and (SMS_G_System_SoftwareFile.FileVersion like "10.%"
or
SMS_G_System_SoftwareFile.FileVersion like "9.%")
I want to return a column with version for all in the collection, rather than just inner join?
ReplyDeleteGreat query....needed it for ie8..outstanding help
ReplyDelete