Short for “WMI console,” wmic is a command line command to query WMI (Windows Management Instrumentation) entries.

Availability

Wmic is an external command that is available for the following Microsoft operating systems. In Windows 10 and Windows 11, it is located at C:\Windows\System32\wbem\WMIC.exe.

Beginning in 2012, WMIC is deprecated in favor of PowerShell cmdlets which perform equivalent CIM operations, such as get-wmiobject, invoke-wmimethod, Get-wmiobject, and gwmi.

  • Availability

  • Syntax

  • Examples

  • Windows XP professional

  • Windows Vista

  • Windows 7

  • Windows 8

  • Windows 10

  • Windows 11

Syntax

wmic [global switches]

Global switches

The following alias/es are available in the current role:

Enclose the switch value in double quotes, if the value contains special characters like ‘-’ or ‘/’.

For more information on a specific alias, type: alias /? at the command prompt.

For more information on CLASS/PATH/CONTEXT, type: (CLASS | PATH | CONTEXT) /? at the prompt.

Examples

wmic

Running wmic alone takes you to the wmic:root\cli> prompt. At the prompt, type /? to get help at any time or /? to get additional help with that alias. To quit from the wmic prompt, type quit or exit.

To run the wmic command, you must have administrative rights.

wmic logicaldisk get name

Display each of the logical disk drives on the computer, as shown below. If you wanted to see all the options for this command, including name, type: wmic logicaldisk get /? at the prompt.

NameC:D:E:

wmic os list brief

This command would give you brief information about the operating system, as shown in the example below.

wmic printer list status

List the printer status of each of the printers installed on the computer.

WMIC /Output:bios.html BIOS Get Manufacturer,Name,Version /Format:htable

The command above may appear involved, but is still relatively simple. First the /Output: is sending the command’s output to the bios.html file, which is saved into the current directory. Next, the wmic BIOS get command will retrieve the Manufacturer, Name, Serial Number, and Version of the BIOS. Finally, the /format:htable will format the results into an HTML table. Below, is an example of how the output may appear in the bios.html file.

1 Instances of Win32_BIOS

wmic product list brief

Lists each of the programs that are installed on the computer with brief details. Note: This command could take a minute or two to complete depending on how many programs you have installed on the computer. Furthermore, the output may exceed the limit of what can be shown in the window. This command can also be made into an HTML table as explained in the previous example.

wmic diskdrive get model,name,size

Display the model, name, and size of the hard drives installed on the computer, as shown in the example below.

Model Name SizeWDC WD3000HLFS-75G6U1 ATA Device \.\PHYSICALDRIVE0 3000664396TRUSTED Mass Storage USB Device \.\PHYSICALDRIVE1 21990203827

wmic os get lastbootuptime

Display when the computer last boot.

 

  • See our WMI definition for further information and related links on this term.