Jump to content


Recommended Posts

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!

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.