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

WINDOWS SYSTEMS AND NETWORK 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 SearchWindowsServer.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 and Network Administration
Troubleshooting Windows application crashes or hangs
Converting VMware ESX machines to Hyper-V format
Using DFSR for SYSVOL replication in Windows Server 2008
Top 25 Windows PowerShell commands for administrators
Key DFS improvements in Windows Server 2008 R2
Free Windows security tools every admin must have
Group Policy makes strides in Windows Server 2008 R2
Quick tips for troubleshooting NTFS permissions
Common causes of Windows server security vulnerabilities
Cutting the cost of Windows identity and access management

Windows Management Instrumentation (WMI) Scripting
Windows scripting tutorials for systems administrators
Windows scripting secrets for disk quota management
Working with WMI providers to PowerShell
Customizing a mapped drive inventory
Vista's Windows kill switch: What to do if RFM kicks in
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.



Server Room Design - Planning, Cooling, Maintenance
HomeTopicsBlogsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




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