User Tools

Site Tools


wiki:os:microsoft:windows:wmic

Windows Management Instrumentation

The Future of WMI

Windows Management Instrumentation, also known as WMI, is a systems management abstraction layer that has been part of Windows since NT (SP4). You can read more about it over here. You might notice in Microsoft's KB article that WMI is allegedly deprecated, being superseded by something called MI (Management Infrastructure). Of course, Microsoft's article on MI has not only laid dormant since 2018; it's officially abandoned and no longer under active development.

I have no idea if or when WMI will actually be permanently deprecated and removed from Microsoft's core OS. There are an awful lot of third party (particularly enterprise and embedded) applications and products that rely on WMI, and there's really nothing adequate to replace WMI. So, for the time being, I'll continue to use it for one very specific purpose: quickly getting hardware details.

WMI has two different console entry points - the classic WMIC utility, and its replacement - PowerShell's built-in WMI support. If you're working on older machines and OSes that don't have PowerShell installed, you can fall back on WMIC to get useful information about the system you're fixing.

What we're interested in here is the details of the hardware itself, which is something important for filing support tickets and warranty claims with OEMs. Instead of relying on labels or etchings on the computer case, this information can be obtained directly from WMI. The most useful bits are in the BIOS and ComputerSystem classes. For custom-built systems, you'll probably also want to query the BaseBoard class.

Note

Custom-built machines generally will have dummy values for Manufacturer, ModelNumber, SerialNumber, and other OEM details.

Using WMIC

You can access WMIC by searching the Start menu, typing wmic at a command prompt (PowerShell or CMD) or in the Run… dialog. WMIC uses its own proprietary syntax to query the running operating system for all kinds of fun information.

BIOS

The BIOS class returns details about both the complete system and the motherboard. The most useful properties are Version, Description, Manufacturer, and SerialNumber. The first three will give details on the BIOS manufacturer (this either an OEM or a BIOS provider like American Megatrends); the SerialNumber value with return the OEM serial number for the system. This may not match external labels if the motherboard was replaced at some point.

You can return multiple values with WMIC as a comma-separated list:

bios get description, manufacturer, serialnumber, version

This will return something like (multiple examples shown below):

Description          Manufacturer              SerialNumber          Version
3703                 American Megatrends Inc.  System Serial Number  ALASKA - 1072009
S80 Ver. 01.10.00    HP                        ----------            HPQOEM - 1
A20                  Dell Inc.                 -------               DELL   - 1072009

On older Dell systems, query SMBIOSBIOSVersion to retrieve the right BIOS version number:

bios get smbiosbiosversion

SMBIOSBIOSVersion
A17

Depending on the system, the Description value may be the full BIOS version number, or a separate version identifier. The information can be useful when looking for the latest BIOS updates. This is a custom-built system, so there is no value for SerialNumber.

BaseBoard

The details of the motherboard itself are under the BaseBoard class.

baseboard get product, manufacturer, serialnumber, version

Manufacturer           Product            SerialNumber     Version
ASUSTeK COMPUTER INC.  SABERTOOTH Z170 S  ---------------  Rev 1.xx

ComputerSystem

OEM systems will include details about the system model name and number in the ComputerSystem class, which is very useful when OEMs reuse the same enclosure across multiple major hardware revisions, making it a lot harder to identify machines by appearance alone.

Note

SystemSKUNumber does not exist in Windows 7.

computersystem get model, systemskunumber

Model                   SystemSKUNumber
HP ProBook x360 435 G7  3S071AV
XPS 13 9343             0665