Windows Management Instrumentation

Windows Management InstrumentationDeveloper(s)| Microsoft

|

Operating system| Microsoft Windows
Platform| IA-32, x86-64, and ARM (historically Itanium, DEC Alpha, MIPS, and PowerPC)
Type| Systems management
License| Same as Microsoft Windows
Website| learn.microsoft.com/en-us/windows/win32/wmisdk/wmi-start-page

Windows Management Instrumentation (WMI) is a set of extensions to the Windows Driver Model that provides an operating system interface through which instrumented components provide information and notification. WMI is Microsoft's implementation of the Web-Based Enterprise Management (WBEM) and Common Information Model (CIM) standards from the Distributed Management Task Force (DMTF).

WMI allows scripting languages (such as VBScript or PowerShell) to manage Microsoft Windows personal computers and servers, both locally and remotely. WMI comes preinstalled in Windows 2000 and later. It is available as a download for Windows NT 4.0,[1] Windows 95, and Windows 98.[2]

Also included with Windows was Windows Management Instrumentation Command-line (WMIC), a CLI utility to interface with WMI.[3] However, starting with Windows 10, version 21H1 and Windows Server 2022, WMIC is deprecated in favor of PowerShell.[4]

## Contents

* 1 Purpose of WMI
* 2 Development process
* 3 Providers
* 4 Features
* 5 Service
* 6 WMI tools
* 7 Wireless networking example
* 8 WMI driver extensions
* 9 Other examples of using WMI
* 10 See also
* 11 References
* 12 Further reading
* 13 External links

## Purpose of WMI

The purpose of WMI is to define a proprietary set of environment-independent specifications that enable sharing management information between management apps. WMI prescribes enterprise management standards and related technologies for Windows that work with existing management standards, such as Desktop Management Interface (DMI) and Simple Network Management Protocol (SNMP). WMI complements these other standards by providing a uniform model for accessing management data from any source.

## Development process

Because WMI abstracts the manageable entities with Common Information Model (CIM) and a collection of providers, the development of a provider implies several steps. The major steps can be summarized as follows:

1. Create the manageable entity model
1. Define a model
2. Implement the model
2. Create the WMI provider
1. Determine the provider type to implement
2. Determine the hosting model of the provider
3. Create the provider template with the ATL wizard
4. Implement the code logic in the provider
5. Register the provider with WMI and the system
3. Test the provider
4. Create consumer sample code.

## Providers

This article is missing information about the nature of WMI providers. Please expand the article to include this information. Further details may exist on the talk page. (February 2025)

|

Since the release of the first WMI implementation during the Windows NT 4.0 SP4 era (as an out-of-band download), Microsoft has consistently added WMI providers to Windows:

* On Windows NT 4.0, the WMI package shipped with 15 providers.
* Windows 2000 shipped with 29 WMI providers.
* Windows Server 2003 came with approximately 80 WMI providers.
* Windows Vista includes 13 new WMI providers,[5] hence ships with approximately 100 providers.
* Windows Server 2008 includes more providers for IIS 7, PowerShell and virtualization.
* Windows 10 adds 47 providers for the Mobile Device Management (MDM) service.[6]

Many customers have interpreted the growth in numbers of providers as a sign that Microsoft envisions WMI as the ubiquitous management layer of Windows.

Beyond the scripting needs, most leading management solutions, such as Microsoft Operations Manager (MOM), System Center Configuration Manager (SCCM), Active Directory Services (ADS), HP OpenView (HPOV), and the various offerings of BMC Software and CA, Inc. are WMI-enabled, i.e., capable of consuming and providing WMI information. This enables administrators who lack WMI coding skills to benefit from WMI.

## Features

WMI offers many features out of the box. Here are the most important advantages:

* Automation interfaces: WMI comes with a set of automation interfaces ready to use. Beyond the WMI class design and the provider development, the Microsoft development and test teams are not required to create, validate or test a scripting model as it is already available from WMI.
* .NET management interfaces: The `System.Management` namespace[7] makes WMI classes available to all .NET apps and scripts written in C# or PowerShell. Beyond the WMI class design and the provider development, the Microsoft development and test teams are not required to create, validate and test new assemblies to support a new namespace in .NET as this support is already available from WMI.
* COM interfaces: Unmanaged code in Microsoft Windows (e.g., apps written in C or C++ languages) can interact with the standard set of WMI interfaces for the Component Object Model (COM) to access WMI providers and their supported WMI classes. Developers of WMI providers can leverage the same COM interfaces in their projects to furnish said classes.
* Remoting capabilities over DCOM and SOAP: In addition to local management via COM, WMI supports remoting via Distributed COM (DCOM) and SOAP. The latter is available in Windows Server 2003 R2 and later, through the WS-Management initiative led by Microsoft, Intel, Sun Microsystems, and Dell. This initiative allows running any scripts remotely or to consume WMI data through interfaces that handle SOAP requests and responses. WS-Management can consume everything that a WMI provider generates, although embedded objects in WMI instances were not supported until Windows Vista. WS-Management later became an integral part of PowerShell. Unlike SOAP-based remoting, DCOM-based remoting requires a proxy DLL deployed on each client machine.
* Support for queries: WMI offers support for WQL queries.[8] This means WMI can still filter the results of a provider that doesn't implement filtering or queries.
* Event-handling capabilities: WMI can notify a subscriber of events of interest. WMI uses the WQL to submit event queries and define the type of events to be returned. Anyone writing a WMI provider can have the benefit of this functionality at no cost for their customers. It will be up to consumers to decide how they desire to consume the management information exposed by the WMI provider.

To speed up the process of writing a WMI provider, the WMI team developed the WMI ATL Wizard to generate the code template implementing a provider. The code generated is based on the WMI class model initially designed by the developer. The WMI provider developer will be able to interface the pre-defined COM or DCOM interfaces for the WMI provider with its set of native APIs retrieving the management information to expose.

WMI is based on an industry standard called Common Information Model (CIM) defined by the Distributed Management Task Force (DMTF). The CIM class-based schema is defined by a consortium of manufacturers and software developers for the requirements of the industry. Any developer can write code that fits into this model. For instance, Intel develops WMI providers for its network adapters. HP leveraged existing WMI providers and developed custom WMI providers for its OpenView enterprise management solutions. IBM's Tivoli management suite consumes WMI. Starting with Windows XP SP2, Microsoft leverages WMI to get status information from antivirus software and firewalls.

## Service

On the Windows NT family of operating systems, WMI runs as a Windows service called `WinMgmt`. On the Windows 9x family, WMI runs in the context of the `WinMgmt.exe` executable file. On both Windows 9x and Windows NT families, `WinMgmt.exe` is available as a command-line utility for servicing the WMI repository.[9]

## WMI tools

Microsoft provides the following WMI tools for developers and IT pros:

* MOF compiler (`MOFComp.exe`): The Managed Object Format (MOF) compiler parses a file containing MOF statements and adds the classes and objects defined in the file to the CIM repository. The MOF format is a specific syntax to define CIM class representation in an ASCII file. MOF's role for CIM is comparable to MIB's role for SNMP. `MOFComp.exe` is included in every WMI installation. Every definition existing in the CIM repository is initially defined in an MOF file. MOF files are located in `%SystemRoot%\System32\WBEM`. During the WMI setup, they are loaded in the CIM repository.
* WMI Administrative Tools: This suite of tool consists of WMI CIM Studio, WMI Object Browser, WMI Event Registration, and WMI Event Viewer. The most important tool for a WMI provider developer is WMI CIM Studio as it helps in the initial WMI class creation in the CIM repository. It uses a web interface to display information and relies on a collection of ActiveX components installed on the system when it runs for the first time. WMI CIM Studio can:
* Connect to a chosen system and browse the CIM repository in any namespace available.
* Search for classes by their name, by their descriptions or by property names.
* Review the properties, methods, and associations related to a given class.
* See the instances available for a given class of the examined system.
* Perform Queries in the WQL language.
* Generate an MOF file based on selected classes.
* Compile an MOF file to load it in the CIM repository.
* `WBEMTest.exe` is a WMI tester tool delivered with WMI. This tool allows an administrator or a developer to perform most of the tasks from a graphical interface that WMI provides at the API level. Although available under all Windows NT-based operating systems, this tool is not officially supported by Microsoft. WBEMTest provides the ability to:
* Enumerate, open, create, and delete classes.
* Enumerate, open, create, and delete instances of classes.
* Select a namespace.
* Perform data and event queries.
* Execute methods associated to classes or instances.
* Execute every WMI operation asynchronously, synchronously or semi-asynchronously.

* WMI command line tool (WMIC) is a scripting and automation utility that allows information retrieval and system administration via WMI, using some simple keywords (aliases). WMIC.exe is available on all Windows versions since Windows XP. Starting with Windows 10, version 21H1 and Windows Server 2022, WMIC is deprecated in favor of PowerShell.[4] In Windows 11, version 24H2, WMIC is not installed by default. A Linux port of WMIC, `wmi-client`, is written in Python and is based on Samba4.[10]
* WBEMDump.exe: This command-line tool is a component of the Platform SDK and comes a corresponding Visual C++ project. The tool can show the CIM repository classes, instances, or both. It is possible to retrieve the same information WMIC retrieves. `WBEMDump.exe` requires more specific knowledge about WMI, as it doesn't abstract WMI as WMIC. It is also possible to execute methods exposed by classes or instances. Even if it is not a standard WMI tool delivered with the system installation, this tool can be quite useful for exploring the CIM repository and WMI features.
* WMIDiag.vbs (discontinued): The WMI Diagnosis Tool is a VBScript for testing and validating WMI on Windows 2000 and later. This script was downloadable from Microsoft until August 2020.[11] The download includes pretty thorough documentation and the tool supports numerous switches. When run, it will generate up to four text files which: list the steps taken (the LOG file), an overview of the results (REPORT file), a statistics file (in comma separated values format), and optionally a file listing of the providers registered on the machine (PROVIDERS, also in comma separated values format). The report file that is generated includes a list of the issues identified and potential ways to fix them.

## Wireless networking example

In the .NET Framework, the ManagementClass class represents a Common Information Model (CIM) management class. A WMI class can be a `Win32_LogicalDisk` in the case of a disk drive, or a `Win32_Process`, such as a running program like `Notepad.exe`.

This example shows how `MSNdis_80211_ServiceSetIdentifier` WMI class is used to find the SSID of the Wi-Fi network that the system is currently connected to in the language C#:

ManagementClass mc = new ManagementClass("root\\WMI", "MSNdis_80211_ServiceSetIdentifier", null);
ManagementObjectCollection moc = mc.GetInstances();

foreach (ManagementObject mo in moc)

string wlanCard = (string)mo["InstanceName"];
bool active;
if (!bool.TryParse((string)mo["Active"], out active))

active = false;

byte[] ssid = (byte[])mo["Ndis80211SsId"];

The `MSNdis_80211_ServiceSetIdentifier` WMI class is only supported on Windows XP and Windows Server 2003.

## WMI driver extensions

The WMI extensions to WDM provide kernel-level instrumentation such as publishing information, configuring device settings, supplying event notification from device drivers, and allowing administrators to set data security through a WMI provider known as the WDM provider. The extensions are part of the WDM architecture; however, they have broad utility and can be used with other types of drivers as well (such as SCSI and NDIS).

The WMI Driver Extensions service monitors all drivers and event trace providers that are configured to publish WMI or event trace information. Instrumented hardware data is provided by way of drivers instrumented for WMI extensions for WDM. WMI extensions for WDM offer a set of Windows device driver interfaces for instrumenting data within the driver models native to Windows, so OEMs and IHVs can easily extend the instrumented data set and add value to a hardware/software solution. The WMI Driver Extensions, however, are not supported by Windows Vista and later operating systems.[12]

## Other examples of using WMI

Performance Monitor and AIDA64 are examples to using WMI to get some operating system monitoring information.

## See also

* Open Management Infrastructure
* ANT catalog § WISTFULTOLL

## References

1. ↑ "WMI Redistributable for Windows NT". http://www.microsoft.com/downloads/details.aspx?familyid=C174CFB1-EF67-471D-9277-4C2B1014A31E&displaylang=en.
2. ↑ "WMI Redistributable for Windows 95 and Windows 98". http://www.microsoft.com/downloads/details.aspx?familyid=98a4c5ba-337b-4e92-8c18-a63847760ea5&displaylang=en.
3. ↑ "A Description of the Windows Management Instrumentation (WMI) Command-Line Utility (Wmic.exe)". https://support.microsoft.com/en-us/topic/a-description-of-the-windows-management-instrumentation-wmi-command-line-utility-wmic-exe-f5c16751-3a83-49ee-030d-5092ce1a04bb.
4. ↑ 4.0 4.1 "WMIC: WMI command-line utility". Microsoft. 8 March 2023. https://learn.microsoft.com/en-us/windows/win32/wmisdk/wmic.
5. ↑ "Windows Vista Client Manageability". http://download.microsoft.com/download/b/e/3/be37cbce-425e-45c2-a9f5-378026b5be81/04-d-WinMgmtTech-v03-TOURB-FINAL.ppt.
6. ↑ "WMI providers supported in Windows 10". 25 June 2017. https://learn.microsoft.com/en-us/windows/client-management/wmi-providers-supported-in-windows#mdm-wmi-classes.
7. ↑ "System.Management Namespace". Microsoft. 7 February 2025. https://learn.microsoft.com/en-us/dotnet/api/system.management.
8. ↑ "WMI query language (WQL) via PowerShell". 1 May 2011. http://ravichaganti.com/blog/publications/ebook-wmi-query-language-wql-via-powersahell/.
9. ↑ White, Steven (3 November 2023). "winmgmt". Microsoft. https://learn.microsoft.com/en-us/windows/win32/wmisdk/winmgmt.
10. ↑ D'Vine, Rhonda. "Ubuntu – Error". http://packages.ubuntu.com/hardy/python/wmi-client.
11. ↑ "The WMI Diagnosis Utility -- Version 2.2". Microsoft. 24 April 2015. https://www.microsoft.com/en-us/download/details.aspx?id=7684.
12. ↑ "The Windows Vista and Windows "Longhorn" Server Developer Story: Application Compatibility Cookbook". http://msdn2.microsoft.com/en-us/library/aa480152.aspx#appcomp_topic16.

## Further reading

* Snover, Jeffrey (26 June 2006). "Improved Support for WMI". Microsoft. https://devblogs.microsoft.com/powershell/improved-support-for-wmi/.

## External links

* Official website
* WMI Code Creator

* v
* t
* e

Microsoft APIs and frameworks

Graphics|

* Desktop Window Manager
* Direct2D
* Direct3D
* D3D (extensions)
* GDI / GDI+
* WPF
* Silverlight
* WinRT XAML
* Windows Color System
* Windows Image Acquisition
* Windows Imaging Component
* DirectX Graphics Infrastructure (DXGI)
* Windows Advanced Rasterization Platform
* WinG

Audio|

* DirectMusic
* DirectSound
* DirectX plugin
* XACT
* Speech API
* XAudio2

Multimedia|

* DirectX
* Media Objects
* Video Acceleration
* Xinput
* DirectInput
* DirectShow
* Image Mastering API
* Managed DirectX
* Media Foundation
* XNA
* Windows Media
* Video for Windows

Web|

* MSHTML
* RSS Platform
* JScript
* VBScript
* BHO
* XDR
* SideBar Gadgets
* TypeScript

Data access|

* Data Access Components (MDAC)
* ADO
* ADO.NET
* ODBC
* OLE DB
* Extensible Storage Engine
* Entity Framework
* Sync Framework
* Jet Engine
* MSXML
* OPC

Networking|

* Winsock
* LSP
* Winsock Kernel
* Filtering Platform
* NDIS
* Windows Rally
* BITS
* P2P API
* MSMQ
* MS MPI
* DirectPlay

Communication|

* Messaging API
* Telephony API
* WCF

Administration and
management|

* Win32 console
* Windows Script Host
* WMI (extensions)
* PowerShell
* Task Scheduler
* Offline Files
* Shadow Copy
* Windows Installer
* Error Reporting
* Event Log
* Common Log File System

Component model|

* COM
* COM+
* ActiveX
* Distributed Component Object Model
* .NET Framework

Libraries|

* Framework Class Library
* Microsoft Foundation Classes (MFC)
* Active Template Library (ATL)
* Windows Template Library (WTL)

Device drivers|

* WDM
* WDF
* KMDF
* UMDF
* WDDM
* NDIS
* UAA
* BDA
* VxD

Security|

* Crypto API
* CAPICOM
* Windows CardSpace
* Data Protection API
* Security Support Provider Interface (SSPI)

.NET|

* ASP.NET
* ADO.NET
* Remoting
* Silverlight
* TPL
* WCF
* WCS
* WPF
* WF

Software factories|

* EFx Factory
* Enterprise Library
* Composite UI
* CCF
* CSF

IPC|

* MSRPC
* Dynamic Data Exchange (DDE)
* Remoting
* WCF

Accessibility|

* Active Accessibility
* UI Automation

Text and multilingual
support|

* DirectWrite
* Text Services Framework
* Text Object Model
* Input method editor
* Language Interface Pack
* Multilingual User Interface
* Uniscribe

* v
* t
* e

Microsoft Windows components

Management
tools|

* App Installer
* Command Prompt
* Control Panel
* Applets
* Device Manager
* Disk Cleanup
* Disk Defragmenter
* Driver Verifier
* DxDiag
* Event Viewer
* IExpress
* Management Console
* Netsh
* Performance Monitor
* Recovery Console
* Resource Monitor
* Settings
* Sysprep
* System Configuration
* System File Checker
* System Information
* System Policy Editor
* System Restore
* Task Manager
* Windows Error Reporting
* Windows Ink
* Windows Installer
* PowerShell
* Windows Update
* Windows Insider
* WinRE
* WMI

Apps|

* Alarms & Clock
* Calculator
* Calendar
* Camera
* Character Map
* Cortana
* Edge
* Fax and Scan
* Feedback Hub
* File Manager
* Get Help
* Groove Music
* Magnifier
* Mail
* Messaging
* Maps
* Media Player
* Movies & TV
* Mobility Center
* Money
* News
* Narrator
* Notepad
* OneDrive
* OneNote
* Paint
* Paint 3D
* People
* Phone Companion
* Photos
* Quick Assist
* Snipping Tool
* Speech Recognition
* Skype
* Sports
* Sticky Notes
* View 3D
* Store
* Tips
* Voice Recorder
* Wallet
* Weather
* Windows To Go
* Windows Story Remix
* WordPad
* Xbox Console Companion
* Your Phone

Shell|

* Action Center
* Aero
* AutoPlay
* AutoRun
* ClearType
* Explorer
* Search
* Indexing Service
* IFilter
* Saved search
* Namespace
* Special folder
* Start menu
* Taskbar
* Task View
* Windows Spotlight
* Windows XP visual styles

Services|

* Service Control Manager
* BITS
* CLFS
* Multimedia Class Scheduler
* Shadow Copy
* Task Scheduler
* Error Reporting
* Wireless Zero Configuration

File systems|

* CDFS
* DFS
* exFAT
* IFS
* FAT
* NTFS
* Hard link
* Junction point
* Mount Point
* Reparse point
* Symbolic link
* TxF
* EFS
* ReFS
* UDF

Server|

* Domains
* Active Directory
* DNS
* Group Policy
* Roaming user profiles
* Folder redirection
* Distributed Transaction Coordinator
* MSMQ
* Windows Media Services
* Rights Management Services
* IIS
* Remote Desktop Services
* WSUS
* SharePoint
* Network Access Protection
* PWS
* DFS Replication
* Remote Differential Compression
* Print Services for UNIX
* Remote Installation Services
* Windows Deployment Services
* System Resource Manager
* Hyper-V
* Server Core

Architecture|

* Architecture of Windows NT
* Startup process
* NT
* Vista
* CSRSS
* Desktop Window Manager
* Portable Executable
* EXE
* DLL
* Enhanced Write Filter
* Graphics Device Interface
* hal.dll
* I/O request packet
* Imaging Format
* Kernel Transaction Manager
* Library files
* Logical Disk Manager
* LSASS
* MinWin
* NTLDR
* Ntoskrnl.exe
* Object Manager
* Open XML Paper Specification
* Registry
* Resource Protection
* Security Account Manager
* Server Message Block
* Shadow Copy
* SMSS
* System Idle Process
* USER
* WHEA
* Win32 console
* Winlogon
* WinUSB

Security|

* Security and Maintenance
* AppLocker
* BitLocker
* Credential Guard
* Data Execution Prevention
* Family Safety
* Kernel Patch Protection
* Mandatory Integrity Control
* Protected Media Path
* User Account Control
* User Interface Privilege Isolation
* Windows Defender
* Windows Firewall

Compatibility|

* COMMAND.COM
* Virtual DOS machine
* Windows on Windows
* WoW64
* Windows Subsystem for Linux

API|

* Active Scripting
* WSH
* VBScript
* JScript
* COM
* ActiveX
* ActiveX Document
* COM Structured storage
* DCOM
* OLE
* OLE Automation
* Transaction Server
* DirectX
* .NET Framework
* Universal Windows Platform
* Windows Mixed Reality
* Windows Runtime
* WinUSB

Games|

* Solitaire Collection

Discontinued|

| Games|

* 3D Pinball
* Chess Titans
* FreeCell
* Hearts
* InkBall
* Hold 'Em
* Purble Place
* Reversi
* Spider Solitaire
* Solitaire
* Tinker

|

Apps|

* ActiveMovie
* Anytime Upgrade
* Address Book
* Backup and Restore
* Cardfile
* CardSpace
* CD Player
* Contacts
* Desktop Gadgets
* Diagnostics
* DriveSpace
* DVD Maker
* Easy Transfer
* Fax
* Food & Drink
* Help and Support Center
* Health & Fitness
* HyperTerminal
* Internet Explorer
* Journal
* Media Center
* Meeting Space
* Messaging
* Messenger
* Mobile Device Center
* Movie Maker
* MSN Dial-up
* NetMeeting
* NTBackup
* Outlook Express
* Travel
* Photo Gallery
* Photo Viewer
* Program Manager
* Steps Recorder
* Syskey
* WinHelp
* Write

Others|

* ScanDisk
* File Protection
* Media Control Interface
* Next-Generation Secure Computing Base
* POSIX subsystem
* Interix
* Video for Windows
* Windows SideShow
* Windows Services for UNIX
* Windows System Assessment Tool
* WinFS

Spun off to
Microsoft Store|

* DVD Player
* Hover!
* Mahjong
* Minesweeper

* v
* t
* e

Standards of DMTF

DMTF standards|

* ASF
* CDM
* CIM
* CIMI
* DASH
* DMI
* NC-SI
* Redfish
* SMASH
* SMBIOS
* WBEM
* WS-Management

Related standards|

* CMPI
* JSR-48
* OVF
* SMI-S

Implementations|

* WMI
* OMI
* WQL

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Windows Management Instrumentation. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Software:Windows_Management_Instrumentation&oldid=4227729"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template