Software Inventory Tips for ConfigMgr

In general, Hardware Inventory customization is where most energy is spent in customization in ConfigMgr. But there are some tips and tricks to make Software Inventory better, as well.

Let me start by saying why I recommend customizing Software Inventory. Out of the box, the default SINV (software inventory) rule is *.exe on all drives. As a general statement, you usually don't need *.exe on all drives. Most software is installed into the "program files" section of a computer, so that's really all you need, 99% of the time. If you look at "inventoryagent.log" on a sample computer, look for how long a Software Inventory action takes. Depending upon how much is on the computer, how fast it is, whether it is hyperthreaded/dual processor or not, the speed of a SINV action is usually at least a few minutes, and *could* be several hours. I don't know about you, but several hours of scanning for all *.exe file information seems overkill, when I rarely need that information.

So, here's what you do. Remove the existing rule you have in SINV for *.exe on all drives. and replace it with these 2:

*.exe, %programfiles%\, include subdirectories, exclude files in the Windows Directory
*.exe, %programw6432%\, include subdirectories, exclude files in the windows directory

(OPTIONAL note: If we are talking about Configmgr 12, you may want to also have this rule in your CM12 SINV client agent properties: *.exe, %programfiles(x86)%\, include subdirectories, exclude files in the windows directory)

What does this gain you? Lots of time on the client, and less useless data in your database. If you do a quick baseline check of how long a SINV action took on a client when you were doing *.exe on all drives vs. just the *.exe in the program files folders, the client will finish much faster; and you'll still have all the information you really care about.

Some optional prep work. Check to see if anyone is currently using a Collection query that references a specific .exe, which may or may not be in program files. Here's the sql, you could run in SQL Management Studio. You connect to your database, and run this, and see what collection queries are out there, referencing files:

Step 1: look for collections that have dependencies on software inventory filenames:
select crq.queryexpression
from v_collectionrulequery crq
where crq.queryexpression like '%filename%'

Step 2: you may need to export those results into a .csv so you can look at them easier. Unfortunately, this next part is the time consuming part. You may need to check in v_gs_softwarefile.filename and .filepath; and see if, for example, if there is a collection query looking for Widgets.exe, is widgets.exe only in Program Files? If so, then your existing rules limiting to just %programfiles% mentioned above will cover everything. But, if widgets.exe is in c:\SomeWierdLocation; you'll want to add in another rule in your SINV rules, looking specifically for widgets.exe in C:\SomeWierdLocation, so that the collection rule query will have appropriate results. Repeat for any other collections you have that look for a filename, specifically.

Another potential place you need to check might be reporting; it's hard to tell if someone is using one of the built in reports to look for all instances of foobar.exe, whether or not foobar.exe is in programfiles or not. In those cases, you may need to rely on the communications you send out, or wait for someone to ask why the report no longer works correctly.

To me, using the sinv rules I've outlined above will alleviate your need for this next tip, but I'll mention it anyway. There's also a "skip this directory and all subdirectories" workaround you can implement. For example, perhaps you don't want c:\program files\widgets to have it's *.exe inventoried on a specific computer, but everything other *.exe in c:\program files you do want to be inventoried. On that single computer, you can place a "skip" file in that folder.

Published Tuesday, October 04, 2011 4:24 PM by skissinger
Filed under: ,


No Comments