create collection from query

Glenn Maxwell 11,496 Reputation points
2021-04-07T14:57:37.337+00:00

Hi Experts

i have a collection lets say TEST which has windows 2012R2 Servers, Windows 2016 Servers and Windows 2019 servers.
Some servers in this collection have browsers installed. i want to pull all the servers which have Google Chrome installed from this collection and create a new collection
of servers having chrome installed lets say TEST_Chrome. in the same way i want to do for firefox as well. will the below query fetch me the browser information and how to create a collection from query.

in Add/Remove programs for chrome i can see Google Chrome, for firefox on one server i can see Mozilla Firefox 80.0.1 (x64 en-US)(servers may have different versions)

For firefox will the below query work(in Add/Remove Programs its Mozilla Firefox 80.0.1 (x64 en-US) on one server)

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_64 on SMS_G_System_ADD_REMOVE_PROGRAMS_64.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS_64.DisplayName like "%Firefox%"

For Chrome will the below query work(in Add/Remove Programs its Google Chrome)

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_64 on SMS_G_System_ADD_REMOVE_PROGRAMS_64.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS_64.DisplayName like "%Google Chrome%"

if there is any 32bit version how do i pull that also

Microsoft Configuration Manager Application
Microsoft Configuration Manager Application
Microsoft Configuration Manager: An integrated solution for for managing large groups of personal computers and servers.Application: A computer program designed to carry out a specific task other than one relating to the operation of the computer itself, typically to be used by end users.
490 questions
Microsoft Configuration Manager
0 comments No comments
{count} votes

Accepted answer
  1. Sherry Kissinger 4,836 Reputation points
    2021-04-10T20:25:43.74+00:00

    Thanks for the explanation of your goals. With that in mind, here are some various and assorted suggestions (any and all might work).

    Best Solution: If you have any kind of budget at all for buying add-ons for ConfigMgr, Do Not Pass Go, Do Not Collect $200, and go straight here: https://patchmypc.com/third-party-patch-management-for-sccm-and-intune . learn about it, grab their demo; justify the cost to whomever holds the budget. If you can afford to get that, once it's setup and running, you'll likely never worry about how to patch Firefox or Chrome again.

    Other suggestions:
    Yes, doing what you are attempting to do; make collections so you can specifically target applications you create to deploy/update Chrome and Firefox will work. It's just a lot of manual work (by you) to do that. Nothing wrong with that approach. It's just you have to do the collections (and verify they are correct), you have to make the applications (and test they work).

    Another "possibility" (if you can't do PatchMyPC, and you potentially want to reduce Collections); but it also means YOU have to do a lot of verification yourself. You "could" not have collections at all. If you design your Google Chrome application (for example), to have a custom Global Condition, where that Global Condition looks for, let's say... "%programFiles%\whatever\chrome.exe must exist", then when you do a Simulated Deployment (for testing your application logic), deployed to "All Servers", and look at Deployment Reports, you'll see that machines that don't have chrome.exe in that folder would report back "Requirements Not Met", so chrome wouldn't install. and then of course your Deployment Type would have the installation for the latest chrome, and the Verification would be the MSI and version of that version of Chrome. (Since you are in the stage of making collections, I'm guessing you already have a working application; but maybe not; sorry if I'm over-explaining something you already know and are rolling your eyes right now)

    Personally, I'd try to see if you can get the budget approved for PatchMyPC, and get that working. PatchMyPC isn't only for Firefox/Chrome--they also provide third party patches for many other things as well.

    PS: I don't work for them or anything; I just know that currently, they are the best of the breed for 3rd party patching integrated with ECM (there are other vendors, so if you have to do comparisons for your company internal processes, you can look for the other vendors that integrate w/CM for 3rd party patching to compare and contrast)

    0 comments No comments

6 additional answers

Sort by: Most helpful
  1. Sherry Kissinger 4,836 Reputation points
    2021-04-09T14:10:06.627+00:00

    Sure, #1 would be for "machines which have the 64-bit version of Mozilla Firefox installed". #3 would be for "machines which have the 64-bit version of Google Chrome installed"

    If you think you may have 32-bit OS devices (some people still do); OR if you think that people may have installed "32bit" versions of Firefox or Chrome on 64-bit devices, then the easiest method to accommodate that (especially as it sounds like you are still learning), is to have your Collection have TWO queries inside it. You can have multiple collection queries, within one collection.
    So for your "boxes with firefox", you have #1, but then you add another query, to the same collection... but reference the Add_remove_programs (which isn't _64). Now... that assuming that is what you want.

    What are you going to be using this collection for? In general, collections should only be used when you are going to "target something to those machines", like an upgrade, or a "uninstall firefox" (for example). If you are planning to have a collection with a mix of 32-bit and 64-bit firefox, and plan on deploying a firefox upgrade to them--that's fine; but then remember you'll want to design your application to have two deployment types--one for the 64bit FF and one for the 32-bit FF, with Requirements so that the end points know which deployment type is for them.

    If you aren't going to be targeting the collection with anything; then are you just using the collection "like a report"? you are using the console to show you who has firefox installed? To me, that's not what collections are for. That is reporting. Have you looked at the default reports for installed software?

    0 comments No comments

  2. Glenn Maxwell 11,496 Reputation points
    2021-04-10T17:04:05.21+00:00

    what i am trying to achieve is the below
    i have 2000 plus servers in my environment and i believe 40 percent servers have browsers installed i.e 64bit. i have a specific collection say TEST where i deploy windows updates every second Saturday. and a collection SBOX where i deploy windows updates every second Sunday.
    i want to create a Firefox collection and chrome collection using the above query using the TEST collection to pull the servers having chrome and Firefox installed from TEST collection and create a new collection so that i can upgrade firefox and chrome on second saturday. In the same way for SBOX also. The application packages i have for firefox will install or update browsers. i dont want browsers to be installed on servers which dont have any browser installed yet. i only want to update the browsers. i am not sure if this is right approach?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.