Visual Basic.NET
  Home arrow Visual Basic.NET arrow WMI Programming with Visual Basic.NET: Bre...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
VISUAL BASIC.NET

WMI Programming with Visual Basic.NET: Breaking the Ice
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 15
    2005-06-21

    Table of Contents:
  • WMI Programming with Visual Basic.NET: Breaking the Ice
  • Our first program to connect to WMI (on a local computer)
  • Getting information from WMI
  • Our first program to connect to WMI (on a remote computer)

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    WMI Programming with Visual Basic.NET: Breaking the Ice


    (Page 1 of 4 )

    The goal of this series is to introduce Microsoft Windows Management Instrumentation (WMI) and get you up and running as quickly as possible, using it to manage your system through the WMI programming using .NET. In this article, we will cover the basics of WMI and how to access WMI information from Visual Basic.NET (both locally and remotely). Before diving into further details, we first need a little background in what WMI is, how it came about, and why it is valuable.


    You can download a zip file of the entire Visual Studio.NET solution (developed for this article) here.

    Introduction to WMI

    Windows Management Instrumentation (WMI) is the Microsoft implementation of Web-based Enterprise Management (WBEM), an industry initiative to establish standards for accessing and sharing management information over an enterprise network. WMI is WBEM-compliant and provides integrated support for the Common Information Model (CIM), the data model that describes the objects that exist in a management environment.

    WMI includes a CIM-compliant object repository, which is the database of object definitions, and the CIM Object Manager, which handles the collection and manipulation of objects in the repository and gathers information from WMI providers. WMI providers act as intermediaries between WMI and components of the operating system, applications, and other systems. For example, the registry provider draws information from the registry, while the SNMP provider provides data and events from SNMP devices. Providers give information about their components, and might provide methods to manipulate the components, properties that can be set, or events that can alert you to changes in the components.

    The two paragraphs above are the definitions of WMI from Microsoft WMI team. But to put it simply, you can almost manage (or administrate) a single computer, an entire network, or even several domains with just WMI. The information you get from WMI can be further integrated with databases or the Web in an enterprise to work very efficiently, or remotely. To get the information from WMI, we need to use scripting (such as VBScript or Jscript) together with a huge repository of CIM. CIM contains all classes, objects or namespaces to the related resources (such as network, printer, and so forth).

    Experts even suggest diverting to WMI rather than working on core WIN32 API. It is more difficult for a beginner to understand and work with WIN32 API than WMI. You can use WMI with programming (including .NET) or scripting systems (such as Windows Script Host) to retrieve configuration details about most aspects of your computer systems, including server applications, to make changes to your systems or even to schedule the scripts. We can also remotely administer the systems available in the network using WMI. And another wonder is that several tools from Microsoft are developed using WMI as the main technology. These tools include Microsoft Systems Management Server, Microsoft Operations Manager, and others.

    What all of this means is that WMI makes Windows 2000/2003 extremely manageable by using a single consistent, standards-based, extensible and object-oriented interface. Also, any application or script accessing WMI data can do so on the local machine or remotely in a seamless way. And, it's not only for Windows 2000/2003; WMI is available for Windows 95, Windows 98, and Windows NT 4.0 as well (with a separate free download).

    The above paragraphs just gave only a very basic introduction to WMI. Since this article (and series) mainly focuses on accessing WMI by using .NET, I request the readers to go through MSDN and WMI SDK for a complete architecture and explanation of how to use WMI.

    More Visual Basic.NET Articles
    More By Jagadish Chaterjee


       · nice article. just what i wanted
     

    VISUAL BASIC.NET ARTICLES

    - User-defined Functions using Visual Basic Ap...
    - Understanding Object Binding in VBA
    - Mastering the Message Box
    - Testing a Windows Forms Application
    - Using Visual Basic.NET Features to Code a Wi...
    - Correcting Code in a Windows Forms Applicati...
    - Write Readable Code and Comments for Windows...
    - How to Code and Test a Windows Forms Applica...
    - Adding Features to a Windows Forms Applicati...
    - How to Design a Windows Forms Application
    - LINQ to XML Programming Using Visual Basic.N...
    - Understanding Delegates using Visual Basic.N...
    - Create a Sudoku Puzzle Generator using VB.NET
    - Entity Creation and Messaging in a VB.NET Te...
    - Movement and Player Statistics in a VB.NET T...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek