I would like to begin by apologizing for my absence. We will just say that I have been spending my time “acquiring knowledge” for new posts (a.k.a. I have been absolutely slammed at work). I could go on about how busy I have been, but we all are, so I will spare you the sad violin music and move forward to this fantastic post, along with the 10 others that I have lined up.
During my “quest for knowledge,” I came across a situation where I was asked to gather all of the machines that are Lenovo ThinkCenter M92p. Easy, right? My hardware inventory already pulls “Computer System” information…I’ll just check Resource Explorer for the model and build a query off of that.
Weeeeeeeeellllll, guess what…
We are a Lenovo shop. Anybody who is a Lenovo shop understands that Lenovo will put out what they define as the “version” (e.g. M92p or T430s) and then have literally dozens of variations on the build, each with their own model number. So, for example, you can have 10 M92p machines in your environment, but some are M92p 2988E1U and others are 3218, etc. Guess what shows up under “model” when you query WMI. That’s right…the build type. We actually want to grab the “version” from “Computer System Product.”
SCCM (naturally) does not pull from “Computer System Product” by default. Therefore, go to Administration > Client Settings > Default Client Settings (or whatever custom Client Settings package you use to manage hardware inventory) > Hardware Inventory > Set Classes. There, you can check “Computer System Product (Win32_ComputerSystemProduct)” and select any or all of the subcategories you need (in this case, “Version”). Once the change is made and the next hardware inventory cycle is run, you should see data being pulled for “Computer System Product” and the “Version.”
Now, to create a query and gather all of our M92p machines!
Here is my query:
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_COMPUTER_SYSTEM_PRODUCT on SMS_G_System_COMPUTER_SYSTEM_PRODUCT.ResourceID = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM_PRODUCT.Version like “%M92p%”