wmic

Windows CMD · System · available in the simulator

What it does

Windows Management Instrumentation (WMI) command-line utility.

Syntax

wmic [alias] [get|where|call] ...

Options and parameters

  • get CAMPO

    Selects properties to display.

  • where COND

    Filters results based on condition.

  • /node:HOST

    Executes on a remote host.

  • get

    Retrieves the specified properties for the alias.

    wmic os get caption,version
  • where

    Filters the objects to act upon.

    wmic process where name='notepad.exe' get processid
  • /node

    Executes the query on the specified computers.

  • /user

    User name for the remote connection.

  • /password

    Password for the remote connection.

  • /namespace

    WMI namespace to use.

  • /output

    Redirects output to a file.

  • /format

    Formats the output, for example with /format:csv.

Usage examples

  • wmic cpu get name
  • wmic os get version
  • wmic logicaldisk get name,size,freespace
  • wmic os get caption,version
  • wmic process where name='notepad.exe' get processid

Notes and common mistakes

  • WMIC is deprecated in modern Windows versions; Microsoft recommends using PowerShell CIM cmdlets.
Practise wmic

Related commands