====== Windows: wmic ======
El comando ''wmic'' (//Windows Management Instrumentation Command-line//) es una herramienta clásica de [[..:windows|Windows]] para consultar y administrar información del sistema mediante **WMI** (//Windows Management Instrumentation//).
Soportado desde Windows XP.
Está obsoleto desde Windows 10 (Microsoft recomienda no usarlo). En versiones modernas de Windows 10/11 puede estar, pero Microsoft recomienda usar [[powershell|PowerShell]] (''Get-CimInstance'' / ''Get-WmiObject'') como reemplazo
===== Casos de uso =====
==== Información del sistema operativo ====
wmic os get caption,version,buildnumber
Ejemplo de salida:
BuildNumber Caption Version
26100 Microsoft Windows 11 Pro 10.0.26100
==== Información del procesador ====
wmic cpu get name,numberofcores,numberoflogicalprocessors
Ejemplo de salida:
Name NumberOfCores NumberOfLogicalProcessors
13th Gen Intel(R) Core(TM) i7-1365U 10 12
==== Ver programas instalados ====
wmic product get name,version
Ejemplo de salida:
Name Version
Microsoft Teams Meeting Add-in for Microsoft Office 1.25.28902
UiPath Studio 24.10.6.0
Python 3.13.0 Add to Path (64-bit) 3.13.150.0
Python 3.13.0 Standard Library (64-bit) 3.13.150.0
Python 3.13.0 Tcl/Tk Support (64-bit) 3.13.150.0
Python 3.13.0 Development Libraries (64-bit) 3.13.150.0
Python 3.13.0 Core Interpreter (64-bit) 3.13.150.0
Python 3.13.0 pip Bootstrap (64-bit) 3.13.150.0
Python 3.13.0 Executables (64-bit) 3.13.150.0
Python Launcher 3.13.150.0
Python 3.13.0 Documentation (64-bit) 3.13.150.0
Python 3.13.0 Test Suite (64-bit) 3.13.150.0
Office 16 Click-to-Run Extensibility Component 16.0.19127.20570
Office 16 Click-to-Run Localization Component 16.0.19127.20570
Simba ODBC Driver for Google BigQuery 3.1 (64-bit) 3.1.4.1020
Microsoft Visual C++ 2008 Redistributable - x64 9.0.30729.4148 9.0.30729.4148
Brother iPrint&Scan 11.1.1.1
Microsoft .NET Host FX Resolver - 8.0.25 (x64) 64.100.48707
Nexthink Collector 26.2.01031
Microsoft Visual C++ 2022 X86 Additional Runtime - 14.42.34433 14.42.34433
Windows SDK EULA 10.1.18362.1
Cisco Secure Client - Diagnostics and Reporting Tool 5.1.5.65
Microsoft PFE Remediation for Configuration Manager 16.3.5.0
Microsoft .NET Host - 8.0.25 (x64) 64.100.48707
SafeSign 64-bits 3.0.124
Simba ODBC Driver for Google BigQuery 3.1 (32-bit) 3.1.4.1020
Microsoft .NET Runtime - 8.0.25 (x64) 64.100.48707
PowerToys (Preview) 0.97.2
Java 8 Update 461 8.0.4610.11
Java 8 Update 461 (64-bit) 8.0.4610.11
==== Listar procesos en ejecución ====
wmic process list brief
Ejemplo de salida:
HandleCount Name Priority ProcessId ThreadCount WorkingSetSize
0 System Idle Process 0 0 36 8192
8546 System 8 4 436 139264
0 Secure System 8 188 0 66097152
0 Registry 8 232 4 59236352
58 smss.exe 11 892 2 364544
1052 csrss.exe 13 1364 15 3366912
163 wininit.exe 13 1452 1 2228224
(...)
==== Terminar un proceso ====
Para cerrar el bloc de notas:
wmic process where name="notepad.exe" delete
==== Información de discos ====
wmic logicaldisk get name,size,freespace
Ejemplo de salida:
FreeSpace Name Size
89239429120 C: 506332180480
El valor es en bytes.
==== Información de la BIOS ====
wmic bios get manufacturer,serialnumber
Ejemplo de salida:
Manufacturer SerialNumber
Dell Inc. ABC123
==== Información de red ====
wmic nic get name,macaddress
Ejemplo de salida:
MACAddress Name
00:09:0F:FE:01:01 Fortinet Virtual Ethernet Adapter (NDIS 6.30)
00:09:0F:AB:00:01 Fortinet SSL VPN Virtual Ethernet Adapter
Cisco AnyConnect Virtual Miniport Adapter for Windows x64
0A:00:21:00:00:10 VirtualBox Host-Only Ethernet Adapter
A0:B3:39:6E:36:74 Intel(R) Wi-Fi 6E AX211 160MHz
28:00:AE:4D:72:B8 Intel(R) Ethernet Connection (23) I219-LM
A0:B4:39:6E:36:75 Microsoft Wi-Fi Direct Virtual Adapter
Microsoft Kernel Debug Network Adapter
Hyper-V Virtual Switch Extension Adapter
A0:B1:39:6E:36:78 Bluetooth Device (Personal Area Network)
A2:BA:39:6E:36:74 Microsoft Wi-Fi Direct Virtual Adapter #2
WAN Miniport (SSTP)
WAN Miniport (IKEv2)
WAN Miniport (L2TP)
WAN Miniport (PPTP)
WAN Miniport (PPPOE)
DE:23:21:52:41:53 WAN Miniport (IP)
DE:82:30:52:41:53 WAN Miniport (IPv6)
E1:FC:20:52:41:53 WAN Miniport (Network Monitor)
==== Usuario del sistema ====
wmic useraccount get name,sid
Ejemplo de salida:
Name SID
ABC123 S-1-5-21-3728440540-4386590884-3929525813-1003
Administrador S-1-5-21-3728440540-4386590884-3929525813-510
DefaultAccount S-1-5-21-3728440540-4386590884-3929525813-504
Invitado S-1-5-21-3728440540-4386590884-3929525813-511
pepito S-1-5-21-3728440540-4386590884-3929525813-1013
L1p20iG S-1-5-21-3728440540-4386590884-3929525813-1107
WDAGUtilityAccount S-1-5-21-3728440540-4386590884-3929525813-574