Getting started with Windows Management Instrumentation

Most people are accustomed to managing Windows XP Professional the point-and-click way. However, thanks to the Windows Management Instrumentation (WMI) technology, Microsoft’s implementation of the Web Based Enterprise Management (WBEM) standard published by the Distributed Management Task Force (, you can also use the command line to manage Windows XP Professional.

WMI allows you to manage computers locally or remotely over a network. It uses XML containers or databases, formatted according to the Common Information Model (CIM) standard schema. The files for the WBEM implementation in Windows XP Professional are in %systemroot%\System32\Wbem by default.

Working directly with WMI schemas and classes is cumbersome, so Microsoft provides the WMIC (WMI command-line) tool as an interface to them. WMIC comes with a set of built-in aliases which makes it easier to get to the WMI classes and use them for common management tasks. WMIC can be used either interactively, which puts in a shell mode with a prompt, or non-interactively for quick tasks or inclusion in scripts (see here for a screenshot).

To start up WMIC, simply open a CMD shell and type “wmic” into it. You’ll see this prompt:


which tells you that WMIC is active, and that you’re at the top-level ‘role’ or namespace on your computer. To see which aliases are available, type /? for a full listing; each alias comes with online help, again accessible with the /? switch, like this:

wmic:root\cli>cpu /?

CPU - CPU management.

HINT: BNF for Alias usage.
(<alias> [WMIObject] | <alias> [<path where>] | [<alias>] <path where>) [<verb clause>].


CPU ASSOC [<format specifier>]
CPU CREATE <assign list>
CPU GET [<property list>] [<get switches>]
CPU LIST [<list format>] [<list switches>]

If you then, for example, type cpu get /? you’ll get the full property list retrievable for that sub-command, as well as the various switches for output formatting it supports.

The CREATE and DELETE command obviously don’t do anything of the kind with the physical devices in your computer; instead, they work on the WMI classes, so be careful when using them.

Here’s an example of how to select data from the ‘get’ sub-command output:

wmic:root\cli>cpu get manufacturer, maxclockspeed, l2cachesize
L2CacheSize Manufacturer MaxClockSpeed
1024 GenuineIntel 1395

WMIC comes into its own when used for managing systems over a network. Provided security policies grant you access and Remote Procedure Calls are available, managing networked computers is as easy as:


Another nice feature of WMIC is that it allows you to save the command output in TXT, HTML, XML, CSV and other formats. Here’s a quick way to create an HTML table with all the Hotfixes and updates installed on your computer listed:

C:\wmic /output:c:\qfelist\qfe.html qfe get /format:htable.xsl

Note that, currently, WMIC doesn’t handle paths with spaces in them. Use the /APPEND alias to add additional listings to the output file. You can do more than just data collection and report formatting with WMIC. This command kills a hung process, program.exe, on the computer Derek:

c:\wmic /node:”derek” process where name=”program.exe” delete

Windows XP Professional comes with a GUI tool to browse schemas on your local and remote computers: the WMI Tester program (wbemtest.exe). You can use WBEMtest to view all the 900-plus classes provided with Windows XP Professional, create and delete new ones, as well as execute methods, run queries and generally learn more about WMI. The WMI Tester comes with good documentation in a Windows Help file, which is an added bonus.


Please note that these tips require Administrator security context for the full set of commands and, in some cases, give access to low-level configuration of your computer which, if set wrongly, could render it inoperable. Back up your system before implementing!

Join the newsletter!

Error: Please check your email address.
Rocket to Success - Your 10 Tips for Smarter ERP System Selection
Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Juha Saarinen

PC World
Show Comments

Cool Tech

Breitling Superocean Heritage Chronographe 44

Learn more >

SanDisk MicroSDXC™ for Nintendo® Switch™

Learn more >

Toys for Boys

Family Friendly

Panasonic 4K UHD Blu-Ray Player and Full HD Recorder with Netflix - UBT1GL-K

Learn more >

Stocking Stuffer

Razer DeathAdder Expert Ergonomic Gaming Mouse

Learn more >

Christmas Gift Guide

Click for more ›

Most Popular Reviews

Latest Articles


PCW Evaluation Team

Ben Ramsden

Sharp PN-40TC1 Huddle Board

Brainstorming, innovation, problem solving, and negotiation have all become much more productive and valuable if people can easily collaborate in real time with minimal friction.

Sarah Ieroianni

Brother QL-820NWB Professional Label Printer

The print quality also does not disappoint, it’s clear, bold, doesn’t smudge and the text is perfectly sized.

Ratchada Dunn

Sharp PN-40TC1 Huddle Board

The Huddle Board’s built in program; Sharp Touch Viewing software allows us to easily manipulate and edit our documents (jpegs and PDFs) all at the same time on the dashboard.

George Khoury

Sharp PN-40TC1 Huddle Board

The biggest perks for me would be that it comes with easy to use and comprehensive programs that make the collaboration process a whole lot more intuitive and organic

David Coyle

Brother PocketJet PJ-773 A4 Portable Thermal Printer

I rate the printer as a 5 out of 5 stars as it has been able to fit seamlessly into my busy and mobile lifestyle.

Kurt Hegetschweiler

Brother PocketJet PJ-773 A4 Portable Thermal Printer

It’s perfect for mobile workers. Just take it out — it’s small enough to sit anywhere — turn it on, load a sheet of paper, and start printing.

Featured Content

Product Launch Showcase

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?