I'm not filtering by OS. The OS of the devices isn't a requirement.
The filter membership is the key to the data I need. I don't want to restrict the data to a filter - that's what I'm doing manually now. I need to go the other direction entirely - I need all the data for every filter at once.
I need to automate the process so the first step of my process loops automatically, turning my two-step process into a one-step, grabbing an aggregate report for all populated filters, and generating output that looks something like this:
Branch 0001
DisplayName |
DisplayVersion |
Publisher |
Count |
Adobe Air |
2.7.1.19610 |
Adobe Systems |
4 |
Adobe Reader 8.1.3 |
8.1.3 |
Adobe Systems Incorporated |
31 |
Internet Explorer |
8 |
Microsoft Corporation |
34 |
Java Auto Updater |
2.0.2.4 |
Sun Microsystems, Inc. |
33 |
Branch 0002
(same table as above)
Branch 0003
(same table as above)
(...)
So, basically, an installed software at every branch master report that I can dump to excel for the folks that have requested the data. The thing that is killing me is that I have a procedural programming background, and working with large "clouds" of data has me confused.
Pseudocode looks something like this:
1. Get a list of GUIDs for all filters with "Branch" in the name.
2. Loop through this list, and query CollectionMembership with the current GUID to get the computers that are in that filter.
3. With the CollectionMembership GUIDs, query Inv_AddRemoveProgram with this group and get back an aggregate list of all software installed at that branch.
4. Format the results and add to result set
5. Loop back to step 2 and get the next GUID in the list. Repeat until finished.
The local DBA here is helping me understand cursors and temporary tables, and that's the route we're looking at currently.