W M I
Ivan F Moala
Can Do
Goto Guest book sign in page [Home]
Thanks for visiting my site lucky visitor:
This page was last updated on: September 14, 2007
Copyright © 2002. XcelFiles. All Rights Reserved Ivan F Moala
Tell a friend about this page
Google
Search WWW Search My Site!



CODE

Click on links in images below to see code.....(links to be updated soon....)

What Is WMI

WMI stands for Windows Management Instrumentation, it is the core management-enabling technology built into Windows 2000, Windows XP, and the Windows 2003 Server family of operating systems. If you are running Windows 95 OSR 2, Windows 98 or Microsoft® Windows NT® 4.0 then look here. Based on the industry standard for Web-Based Enterprise Management 
(WBEM), an industry initiative to develop a standard technology for accessing management information in an enterprise environment. The implimentation is overseen by the Distributed Management Task Force - DMTF:= an organization that works with key technology vendors, including Microsoft, to lead the development, adoption, and unification of management standards and initiatives for desktop, enterprise, and Internet environments.

Windows Management Instrumentation (WMI) makes Windows more manageable using a single consistent, standards-based, extensible and object-orientated interface.
It is the instrumentation / interface through which almost all Windows resources can be accessed, configured, managed, and monitored.
To manage Windows workstations and servers you may have used numerous graphical administrative tools to manage Windows resources, such as disks, event logs, files, folders, file systems, networking components etc. via some graphical user interface.

So, and this is where we step in and look @ what we can do via VB / VBA / API
because all these GUI have one thing in common, they all use Win32 application programming interface (APIs) to access and manage Windows resources (ie. the Core Windows DLLs).
Why? because the only way you could  programmatically access Windows resources before WMI was through the Win32 APIs. This situation left Windows system administrators without an easy way to automate common system administrative tasks using popular scripting languages, because most scripting languages CANNOT call Win32 APIs directly.
As mentioned above, WMI changes all this by providing a consistent model and framework through which all Windows resources are described and exposed to the outside world. Now system administrators can use the WMI Scripting Library together with Windows Script Host and Microsoft Visual Basic Scripting Edition (VBScript), or any scripting language that supports COM automation (Component Object Model = The object-oriented programming model that defines how objects interact within a single process or between processes. In COM, clients have access to an object through Interfaces implemented on the object), to write scripts that manage and automate their enterprise systems, applications, and networks or any Windows resource exposed through WMI.
With its object-oriented design, WMI enforces similarity in implementation. As a result, the WMI provider for one system has a similar look and feel to a WMI provider for another system. Managing many machines from a single remote machine is easier because WMI uses Distributed COM (DCOM). This concept of managing multiple or single systems on multiple or single machines locally or remotely over the Internet is called Web Based Enterprise Management ( WBEM). WMI is to WBEM as tools are to house-building.

As you can see WMI is quite broad and provides for some poweful capabilities. I will only touch on a few of these eg. file systems, printers, processes, and some other operating system components and configuration settings. To get more info have a look @ Microsoft

Below I make mention of Administrative elements, this only touches the surface on what you can do which is why I have looked into this and dedicated some space to WMI.

eg. manage network services such as DNS, DHCP, and SNMP-enabled devices. Using WMI event subscriptions, you can write scripts to monitor and respond to event log entries as they occur, file system and registry modifications, and other real-time operating system changes. Conceptually, WMI event subscriptions and notifications are to WMI what SNMP traps are in the SNMP world. Windows .NET Enterprise Server management. You can write scripts to manage Microsoft® Application Center, Operations Manager, Systems Management Server, Internet Information Server, Exchange Server, and SQL Server. This is where it's usefulness for system administrators comes in, system components can be monitored and controlled, both locally and remotely.
  • Instance Providers
    Instance providers can be implemented as:

    Pull
    Push
    Push Verify
    Pull providers maintain their own data, generating it dynamically when necessary.

    Push and Push Verify providers rely on the CIMOM to maintain their data in the CIM repository.

  • Class Providers
    A class provider is a COM/DCOM server that supplies class definitions. Class providers support:

    Data retrieval
    Modification
    Deletion
    Enumeration
    Query processing

  • Property Providers
    A property provider is a provider that supports the retrieval and modification of WMI properties. Property providers implement the IWbemProviderInit and IWbemPropertyProvider interfaces.


  • Event Providers
    Event providers supply the CIMOM with notifications of particular types of events. Event providers can support both intrinsic and extrinsic events.

    Intrinsic  = Report changes to data in the CIM repository
    Extrinsic = Report changes to provider-specific managed objects

  • Event Consumer Providers

  • Method Providers
  • Query Providers


Again, as I mentioned before I won't touch on these, but just give simple VBA code to do things that you may have thought not possible, remember CAN DO.
 
What do you need for WMI?

Software requirements:

Currently, WMI is included when you install;
  • Microsoft® Windows® 2000,
  • Windows XP,
  • Windows Millennium Edition (Me).

For those running Windows 95 OSR 2, Windows 98 or Microsoft® Windows NT® 4.0, a WMI installation package can be downloaded from Microsoft® MSDN® which offers similar functionality as WMI in Windows 2000, Windows XP, and Windows Me.

ModDetails
ModExcelProc
ModOwn
WMI_FindFolder
WMI_Bios
WMI_CD
WMI_Chassis
WMI_DateTime
WMI_DeleteFolder
WMI_Environ
WMI_FileVar
WMI_Memory
WMI_Methods
WMI_Monitor
WMI_MotherBrd
WMI_Network
WMI_OS
WMI_Processor
WIM_Prt
WMI_Pwd
WMI_Shared
WMI_Snd
WMI_SoftWare
WMI_Tasks