Search notes:

WMIC.exe

The WMI Commandline Utility for interacting with WMI.
WMIC.exe comes with large amount of convenient default aliases for WMI objects.
With Windows 10, version 21H1 and the 21H1 General Availability Channel release of Windows Server, the WMIC tool (but not WMI itself) is deprecated and superseded by Windows PowerShell for WMI.
The recommendation is to use the cmdlets of the CimCmdlets module:
PS C:\> (get-command -module CimCmdlets).name

Invoking WMIC.exe

WMIC.exe is a command line tool. It is expected to be invoked like one of the following variants
wmic
wmic global-switches
wmic command
wmic global-switches command
If command is not specfied, WMIC.exe is started in interactive mode.

Global switches

A global switch is introduced with a forward slash
/NAMESPACE Path for the namespace the alias operate against.
/ROLE Path for the role containing the alias definitions.
/NODE Servers the alias will operate against.
/IMPLEVEL Client impersonation level.
/AUTHLEVEL Client authentication level.
/LOCALE Language id the client should use.
/PRIVILEGES Enable or disable all privileges.
/TRACE Outputs debugging information to stderr.
/RECORD Logs all input commands and output.
/INTERACTIVE Sets or resets the interactive mode.
/FAILFAST Sets or resets the FailFast mode.
/USER User to be used during the session.
/PASSWORD Password to be used for session login.
/OUTPUT Specifies the mode for output redirection.
/APPEND Specifies the mode for output redirection.
/AGGREGATE Sets or resets aggregate mode.
/AUTHORITY Specifies the <authority type> for the connection.
/?[:<BRIEF|FULL>] Usage information.

Some aliases

ALIAS Access to the aliases available on the local system
BASEBOARD Base board (also known as a motherboard or system board) management.
BIOS Basic input/output services (BIOS) management.
BOOTCONFIG Boot configuration management.
CDROM CD-ROM management.
COMPUTERSYSTEM Computer system management. Compare with CSPRODUCT
CPU CPU management.
CSPRODUCT Computer system product information from SMBIOS. Compare with COMPUTERSYSTEM
DATAFILE DataFile Management.
DCOMAPP DCOM Application management.
DESKTOP User's Desktop management.
DESKTOPMONITOR Desktop Monitor management. Compare with get-cimInstance win32_videocontroller)
DEVICEMEMORYADDRESS Device memory addresses management.
DISKDRIVE Physical disk drive management.
DISKQUOTA Disk space usage for NTFS volumes.
DMACHANNEL Direct memory access (DMA) channel management.
ENVIRONMENT System environment settings management.
FSDIR Filesystem directory entry management.
GROUP Group account management.
IDECONTROLLER IDE Controller management.
IRQ Interrupt request line (IRQ) management.
JOB Provides access to the jobs scheduled using the schedule service.
LOADORDER Management of system services that define execution dependencies.
LOGICALDISK Local storage device management.
LOGON LOGON Sessions.
MEMCACHE Cache memory management.
MEMORYCHIP Memory chip information.
MEMPHYSICAL Computer system's physical memory management.
NETCLIENT Network Client management.
NETLOGIN Network login information (of a particular user) management.
NETPROTOCOL Protocols (and their network characteristics) management.
NETUSE Active network connection management.
NIC Network Interface Controller (NIC) management.
NICCONFIG Network adapter management.
NTDOMAIN NT Domain management.
NTEVENT Entries in the NT Event Log.
NTEVENTLOG NT eventlog file management.
ONBOARDDEVICE Management of common adapter devices built into the motherboard (system board).
OS Installed Operating System/s management.
PAGEFILE Virtual memory file swapping management.
PAGEFILESET Page file settings management.
PARTITION Management of partitioned areas of a physical disk.
PORT I/O port management.
PORTCONNECTOR Physical connection ports management.
PRINTER Printer device management.
PRINTERCONFIG Printer device configuration management.
PRINTJOB Print job management.
PROCESS Process management.
PRODUCT Installation package task management.
QFE Quick Fix Engineering.
QUOTASETTING Setting information for disk quotas on a volume.
RDACCOUNT Remote Desktop connection permission management.
RDNIC Remote Desktop connection management on a specific network adapter.
RDPERMISSIONS Permissions to a specific Remote Desktop connection.
RDTOGGLE Turning Remote Desktop listener on or off remotely.
RECOVEROS Information that will be gathered from memory when the operating system fails.
REGISTRY Computer system registry management.
SCSICONTROLLER SCSI Controller management.
SERVER Server information management.
SERVICE Service application management.
SHADOWCOPY Shadow copy management.
SHADOWSTORAGE Shadow copy storage area management.
SHARE Shared resource management.
SOFTWAREELEMENT Management of the elements of a software product installed on a system.
SOFTWAREFEATURE Management of software product subsets of SoftwareElement.
SOUNDDEV Sound Device management.
STARTUP Management of commands that run automatically when users log onto the computer system.
SYSACCOUNT System account management.
SYSDRIVER Management of the system driver for a base service.
SYSTEMENCLOSURE Physical system enclosure management.
SYSTEMSLOT Management of physical connection points including ports, slots and peripherals, and proprietary connections points.
TAPEDRIVE Tape drive management.
TEMPERATURE Data management of a temperature sensor (electronic thermometer).
TIMEZONE Time zone data management.
UPS Uninterruptible power supply (UPS) management.
USERACCOUNT User account management.
VOLTAGE Voltage sensor (electronic voltmeter) data management.
VOLUME Local storage volume management.
VOLUMEQUOTASETTING Associates the disk quota setting with a specific disk volume.
VOLUMEUSERQUOTA Per user storage volume quota management.
WMISET WMI service operational parameters management.

Querying information

A basic usage of WMIC.exe to query processes and their process ids:
wmic process get processId,name
The where option allows to limit the result set:
wmic process where "name='cmd.exe'" get parentProcessId,ProcessId

Meta information about WMIC

WMIC.exe can be used to query about WMI itself:
C:\> wmic wmiset get DatabaseDirectory,EnableEvents,InstallationDirectory,LoggingDirectory,LoggingLevel,MaxLogFileSize
DatabaseDirectory                    EnableEvents  InstallationDirectory     LoggingDirectory                LoggingLevel  MaxLogFileSize
C:\windows\system32\wbem\repository  TRUE          C:\windows\system32\wbem  C:\windows\system32\wbem\Logs\  0             65536

Installed programs

The following query takes quite some time:
wmic product get name,version

Calling methods

Some classes provide methods that can be called. These can be queried like so
wmic process call /?
This reveals, among others, that a process can be created. The first argument is the process, the second the directory in which the process is started:
wmic process call create "cmd /k", %temp%

/format:list

With /format:list, an output that is too wide to be displayed in the console's width can be put in a list:
wmic computersystem get /format:list

See also

wmic can be used to determine if Windows is running in 32 or 64 bit envorinment and or for querying user accounts.

Index