Home > Windows Systems Management Tips > Windows Systems Management and Administration > Microsoft tool exposes WMI namespaces and properties
WinComputing Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

WINDOWS SYSTEMS MANAGEMENT AND ADMINISTRATION

Microsoft tool exposes WMI namespaces and properties


Serdar Yegulalp, Contributor
05.03.2006
Rating: -4.43- (out of 5)


Expert advice on Windows-based systems and hardware
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


Windows Management Instrumentation (WMI) is mainly a programmer's tool that provides programmatic ways to manage a system or get information about the manageable objects in a system. Now, not everyone's a programmer, nor does everyone want to be. However, nearly every administrator is going to have someexposure to programming, even if it's just to use pre-generated code samples.

One utility for generating code that can be used to work with WMI objects is a free tool from Microsoft, called the WMI Code Creator. This is by far the most comprehensive tool I've found for this kind of work, and it's designed to make working with WMI namespaces as effortless as possible.

The program is a self-contained executable; no installation is needed. When you run it, it presents you with four tabs:

  • Query for Data from a WMI Class;
  • Execute a Method;
  • Receive an Event; and
  • Browse the Namespaces on this Computer.

In each tab there's a dropdown that presents a list of all available namespaces and classes for that namespace; there are also drop-downs or selectors for other entities available with each type of item.

For instance, the Method tab contains a list of methods, as well as parameters. If you're querying for data from a WMI class, you can select the properties, then search for any values available for that property. The Receive an Event tab even has a hotlink directly to the online MSDN library that lets you look up the documentation available for the selected event class.

Once you've selected all the details of the WMI class, the code generated to use that class appears in a right-hand pane. If you want to change the language of the code, select one from the Code Language menu; the program supports C#, VB.NET and classic VBScript. The resulting code can also be automatically opened in Notepad or sent directly to a command line to be executed. Finally, the WMI classes don't have to be pulled exclusively from the current computer; any computer that's accessible via RPC can be polled for WMI objects.

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. He is also author of the book Windows Server Undocumented Solutions.

More information from SearchWinSystems.com


Rate this Tip
To rate tips, you must be a member of SearchWinComputing.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
Windows Systems Management and Administration
Tips for Windows domain controller optimization
Quick hits: Troubleshooting service account failure, batch job execution
Case Study: Troubleshooting Windows service dependency failures
Troubleshooting common Windows service failures
How to format NTFS: More tricks to improve file system performance
Key enhancements to SCCM give admins more control over assets, licensing
Windows scripting secrets for disk quota management
Optimizing NTFS file system performance
The new Microsoft System Center: What happened to SMS and MOM?
TeraCopy beefs up Windows file copy operations

Windows Management Instrumentation (WMI) Scripting
Windows scripting secrets for disk quota management
Windows scripting tutorials for systems administrators
Filtering output from Windows PowerShell
Working with WMI providers to PowerShell
Vista's Windows kill switch: What to do if RFM kicks in
Scripting School: Why you should care about Windows PowerShell
Defrag script for all volumes
Christa Anderson's Scripting School for Windows administrators
Microsoft utility helps admins diagnose WMI services
Scripting School: Enhancing scripts that require user input

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.

HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2004 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts