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

Articles in this section

      • Digital Camerasplugin-autotooltip__default plugin-autotooltip_bigDigital Cameras

        Photo Import Wizard

        The Problem

        Since Windows XP, a simple wizard for importing photos has been integrated with the OS. This was called the *Microsoft Scanner and Camera Wizard* in Windows XP. The interface was streamlined in Windows Vista, and that import wizard has been integrated into Windows through at least Windows 10. It's a really useful tool, as it makes it efficient and easy to import photos from a digital camera and name them
    • Enabling Remote Desktop...Remotelyplugin-autotooltip__default plugin-autotooltip_bigEnabling Remote Desktop...Remotely

      I’ve been working on rebuilding my home Active Directory environment, as well as splitting our personal data from multimedia to separate file servers. After getting everything up and running in Windows Server 2016, I moved both servers into our server room (just a corner of the basement, but it sounds fancier).
    • Fixing Microsoft System Center Configuration Manager when it saves a bad server nameplugin-autotooltip__default plugin-autotooltip_bigFixing Microsoft System Center Configuration Manager when it saves a bad server name

      I’m a big scary IT contractor now, working for a relatively small Texas-based company on a contract for the USDA. It’s pretty awesome, and I’ve learned all kinds of things since I started here. One of the cooler tools made available to us is Microsoft System Center, which allows for a single application to manage a huge variety of tasks, including pushing updates to users, working with virtual servers, and inst…
  • Windows 7plugin-autotooltip__default plugin-autotooltip_bigWindows 7

    Windows 7 is officially unsupported by Microsoft. Use at your own risk.

    That said, Microsoft Security Essentials still works, as well as PC Matic, which i haven't used, but has a lot of positive reviews.

    Notes

    Even though Microsoft no longer supports the OneDrive client for Windows 7, you can still connect to your OneDrive quite easily via
  • Maximizing Windows: Restoring “Run As…” in Windows Vistaplugin-autotooltip__default plugin-autotooltip_bigMaximizing Windows: Restoring “Run As…” in Windows Vista

    At work, we use Microsoft SQL Server 2005. The client software requires Windows authentication to connect to a database. However, the credentials are pulled from your logged in Windows account. If you’re not on Purdue’s domain, you can’t connect. While putting my workstation on the domain wasn’t an issue, I prefer using my local user account on my laptop.
  • Windows Management Instrumentationplugin-autotooltip__default plugin-autotooltip_bigWindows 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 windows index