ImaNewb Posted May 30, 2017 Report post Posted May 30, 2017 This may be a stupid question but I am trying to determine how to test WMI Queries in SCCM. Example: I want to target Driver Packages for Make/Model in OSD Task Sequences I read several forums on how to set them in a TS but I would like to confirm the query is correct by pulling results from the SCCM DB if that is possible. Perhaps I need to run it on the machines themselves in WBEMTEST.exe Could anyone point me in the right direction on how to accomplish? I greatly appreciate it! Quote Share this post Link to post Share on other sites More sharing options...
simulacra75 Posted June 2, 2017 Report post Posted June 2, 2017 Not much point attempting to glean data from the CM12 DB using a WMI query that's designed to query a machine, you wouldn't be comparing apples with apples. If you really want to test it properly then you would need to execute the WMI query on the "targeted" machines and verify that the result is what you expect. You do not have to use WBEMTEST for this, it's possible in a lot of WMI queries to query the machine remotely using the pstools command line; e.g. psexec \\<Machine-Name or IP Address> wmic computersystem get model (This would return the model of the machine as contained within the computersystem class) Here's a link to some useful WMIC queries Quote Share this post Link to post Share on other sites More sharing options...
ImaNewb Posted June 2, 2017 Report post Posted June 2, 2017 Simulacra75, Thank you for your reply, that was extremely helpful! Quote Share this post Link to post Share on other sites More sharing options...
itrider Posted June 5, 2017 Report post Posted June 5, 2017 Another method, which I use for some items on local machines is... Download WMI Explorer 2.0 https://wmie.codeplex.com/ Run the app, then under "Launch", choose "WMI Tester". Connect to the machines "root\cimv2". The services buttons will become active. From there, you can choose "Query". When you open the "query", you can paste the exact language you plan to use in SCCM. Choose "Apply" and if it returns a result, it is a "1", which is successful. If it is blank, then it failed. Quote Share this post Link to post Share on other sites More sharing options...