Drekko Posted January 12, 2016 Report post Posted January 12, 2016 Hey guys I am trying to make a query that will show all systems WITH AVG anti-virus installed and want to import that into a device collection to show all devices with AVG installed It is working but only for 1 workstation I have a pyhsical laptop (windows 8) and a windows 7 virtual machine When I import the query into a device collection, it only shows the windows 7 virtual machine I have done multiple software inventory and file collection cycles from the laptop itself updated the collection membership on the config manager console, still no laptop being displayed. Only my Virtual Windows 7 workstation is there This is my query statement: 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_INSTALLED_EXECUTABLE on SMS_G_System_INSTALLED_EXECUTABLE.ResourceID = SMS_R_System.ResourceId where SMS_G_System_INSTALLED_EXECUTABLE.ExecutableName like "%avg%" I have another query to show all systems with Word installed, that works fine for both machines, just this AVG anti-virus one is giving me trouble Quote Share this post Link to post Share on other sites More sharing options...
GarthMJ Posted January 12, 2016 Report post Posted January 12, 2016 Your query looks fine, is AVG installed on the computer? Do you see it within Resource Explorer? Quote Share this post Link to post Share on other sites More sharing options...
YPCC Posted January 12, 2016 Report post Posted January 12, 2016 your querying "installed executable". I usually opt for "installed software" as in our environment that seems to be the most reliable method. Quote Share this post Link to post Share on other sites More sharing options...
Drekko Posted January 13, 2016 Report post Posted January 13, 2016 your querying "installed executable". I usually opt for "installed software" as in our environment that seems to be the most reliable method. I have also been told that people recommend using queries based from add/remove programs, is "installed software the same? Wold you please be able to give me an example of a query design or language on a "installed software" query? SO I can learn this stuff Quote Share this post Link to post Share on other sites More sharing options...
AndreiT Posted January 13, 2016 Report post Posted January 13, 2016 Hi This is an example : I use this to get workstations with Office 2013, but you can change it to look for ProductName like "%avg%" 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_INSTALLED_SOFTWARE on SMS_G_System_INSTALLED_SOFTWARE.ResourceID = SMS_R_System.ResourceId where (SMS_G_System_INSTALLED_SOFTWARE.ProductName like "Microsoft Office Professional Plus 2013%") You can even check the version by adding a check for ProductVersion For example searching for workstations with Office 2013 but without SP1 : 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_INSTALLED_SOFTWARE on SMS_G_System_INSTALLED_SOFTWARE.ResourceID = SMS_R_System.ResourceId where (SMS_G_System_INSTALLED_SOFTWARE.ProductName like "Microsoft Office Professional Plus 2013%") and (SMS_G_System_INSTALLED_SOFTWARE.ProductVersion < "15.0.4569.1506") anyway I think what you're looking for is this: 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_INSTALLED_SOFTWARE on SMS_G_System_INSTALLED_SOFTWARE.ResourceID = SMS_R_System.ResourceId where (SMS_G_System_INSTALLED_SOFTWARE.ProductName like "%avg%") Good luck. Regards, Andrei T Quote Share this post Link to post Share on other sites More sharing options...