Thoughts from the EPS Windows Server Performance Team
Previously, my colleague Jeff demonstrated the power of Scriptomatic 2.0. To recap, Scriptomatic is a tool that helps you write scripts to query WMI classes and gather management information.
Today we introduce to you the WMI Code Creator tool, similar to Scriptomatic but even more powerful!
This is a great tool for beginners to quickly learn and create WMI management scripts.
While the main utility of Scriptomatic was to query WMI for values/data, WMI Code Creator takes things to the next level. Some of the salient features of WMI Code Creator are:
WMI Code Creator can create code that can be run on the Local Computer, Remote computer or a group of remote computers, based on what you choose from the Target Computer menu.
Another very useful and powerful feature is the ability to deliver the code in various languages – VB Script, VB .Net or C#. The Code Language menu allows you to choose.
Query for data from a WMI class tab:
This tab is very similar to Scriptomatic and provides the same level of functionality. It also provides you an option to search for possible property values without executing the script:
Execute a Method:
The Execute a Method tab is a very powerful feature that is not found in Scriptomatic.
There are many executable methods across the various WMI classes.
Using methods, you can do things like creating a new process, adding a printer connection, setting the Default printer, install/uninstall/reinstall a product, shutdown/reboot the system, mounting/dismounting Drives and others. And the best part is you don’t need to know beforehand what methods are available.
WMI code creator displays the executable methods in each class and lets you select them from a drop down menu:
You can specify the instances against which you can run and method parameters and wherever required before execution.
Receive an Event:
The third tab within the tool enables you to generate code to receive event notifications.
You can generate code to receive event notification for events like process creation, service start/stop, computer is shut down etc…
The drop down menu lists available event query conditions for each Event class:
With a little manual modification, you can even modify the code to send you an email in case any of these events are triggered, otherwise by default you will get a notification on the console.
Browse the WMI name spaces:
The tool also allows you to browse through the available WMI namespaces and classes on the local computer to find their descriptions, properties, methods, and qualifiers:
Overall this is an awesome tool to have for system administrators to learn scripting and WMI queries. For those who already know scripting, this tool should make life a lot simpler at the least!
WMI Code Creator v1.0 Download:
Hope you enjoyed today’s post.
What?!??! VBScript, VB.NET, C# support, but no PowerShell love from the WMI Code Creator? Must be that WMI is so easy to work with from PowerShell that it's not needed. ;)
There is a PowerShell Scriptomatic out there as well from the Technet Script Center - http://www.microsoft.com/technet/scriptcenter/tools/psomatic.mspx
This is great. Thanks for the time you put into this. It really helps to understand WMI through a more complete tool like this.
The managed code creation is very helpful.
I can't wait for the next version!
>>> Today we introduce to you the WMI Code Creator tool, similar to Scriptomatic but even more powerful!
According to the website:
Version: 1.0 was Published: 8/5/2005
There is an updated WMI Code Generator v2.02 from Rob:
It looks like the link is now dead to download the WMI Code Creator.
NP: Investigating now. Thanks!
WMI Code Creator link above fixed.