The Windows Management Instrumentation (WMI) lets you access a virtual treasure trove of system information and settings through scripts or programs. VBScript, Python, Perl and JScript all have methods to access WMI information, but the sheer number of methods – not to mention their cryptic nomenclatures -- can leave people baffled. It's a shame that something as powerful as WMI should be without tools to help people make the most of it.
A while back, engineers at Microsoft created a tool called Scriptomatic to make life easier for people who wanted to write WMI scripts. Despite its limitations, the tool gained quite a following. Now Microsoft has released a new version,
The program itself runs as an HTML application (hence the .HTA extension on the file). Once it finishes loading, select a WMI namespace and class from the dropdowns in the lists at the top of the window, and then select a language and output format from the radio buttons on the right. The output format changes what the script itself produces -- output choices include command-prompt, plain-text, HTML, Excel and XML formats.
To change the name of the target computer for the script, specify one or more machine names in the box at the bottom, separated by commas. The resulting script can be saved as a file or simply copied and pasted into an editor somewhere else, and modified freely. The language for the script itself can be VBScript, Perl, JScript or Python; VBScript is the default, but that can be changed by editing the application's internal settings. (For how to do this, you'll need to see the documentation, which, I should mention, is extremely funny ... proving that just because something comes from Microsoft, it doesn't have to be devoid of humor.)
Serdar Yegulalp is editor of the Windows Power Users Newsletter. Check it out for the latest advice and musings on the world of Windows network administrators -- and please share your thoughts as well!
More information from SearchWinSystems.com
- Tip: Ask Microsoft: How can I make DNS healthy for both clients and servers?
- Tip: Learning Guide: Scripting
- RSS: Sign up for our RSS feed to receive expert advice every day
This was first published in December 2005