Windows/wmic

From Omnia
(Redirected from Wmic)
Jump to navigation Jump to search

wmic

Windows Management

WARNING: WMIC is deprecated, in favor of PowerShell WMI which was deprecated in favor of PowerShell CIM ! (warning from "wmic /?")

This utility is superseded by Windows PowerShell for WMI; see Chapter 7 - Working with WMI.
https://learn.microsoft.com/en-us/powershell/scripting/learn/ps101/07-working-with-wmi?view=powershell-7.4

See PowerShell/WMI

ref: https://learn.microsoft.com/en-us/windows/win32/wmisdk/wmic

Get Motherboard Model

C:\> wmic baseboard get product,Manufacturer
Manufacturer           Product
ASUSTeK COMPUTER INC.  B150I PRO GAMING/WIFI/AURA

Get manufacture product serial number and version:

C:\> wmic baseboard get product,manufacturer,version,serialnumber
Manufacturer  Product   SerialNumber  Version
Supermicro    X13SAE-F  UM22BS0XXXXX  1.02

Get Motherboard Serial Number

C:\> wmic baseboard get serialnumber
SerialNumber
UM22BS02XXXX
C:\> wmic bios get serialnumber
SerialNumber
R9HWGD7

Get CPU Name

wmic cpu get name
C:\> wmic cpu get name
Name
Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz
Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz
C:\> wmic cpu get name
Name
Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
>wmic cpu get name
Name
12th Gen Intel(R) Core(TM) i9-12900KS

ref: [1]

Get Memory Capacity

For a 64GB system:

C:\>wmic computersystem get totalphysicalmemory
TotalPhysicalMemory
68587692032
C:\>wmic memorychip get devicelocator, capacity
Capacity     DeviceLocator
34359738368  PROC 1 DIMM 12
34359738368  PROC 2 DIMM 12

Video Card

C:\>wmic path win32_VideoController get name
Name
NVIDIA GeForce RTX 4060 Ti

If your video card has less than 4GB of ram (32bit limitation) this will also work to show amount of video ram:

C:\>wmic path win32_VideoController get adapterram

Powershell version of wmic:

get-ciminstance win32_videocontroller | select-object -expandproperty adapterram

BIOS Version

>wmic bios get smbiosbiosversion
SMBIOSBIOSVersion
2.1

Windows QFE

See Windows_10/Windows_Update_History

wmic qfe list
C:\> wmic qfe list
Caption                                     CSName          Description      FixComments  HotFixID   InstallDate  InstalledBy          InstalledOn  Name  
ServicePackInEffect  Status
http://support.microsoft.com/?kbid=5034466  MY_SYSTEM-0001  Update                        KB5034466               NT AUTHORITY\SYSTEM  1/24/2024
http://support.microsoft.com/?kbid=5027122  MY_SYSTEM-0001  Update                        KB5027122               NT AUTHORITY\SYSTEM  6/14/2023
...

List Disk and Network Drives

Loop volume verify: [2]

@echo off
rem listdrives.bat by Kenneth Burgener <kenneth@kennethburgener.org> © Nov 2012

echo Available Drives:
for %%a in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
  rem echo %%a::
  vol %%a: 1>NUL 2>NUL && echo %%a:
)

Windows Vista and Windows 7: [3]

wmic logicaldisk get name

List physical drives like \\.\PHYSICALDRIVE1 [4]

wmic diskdrive list
wmic diskdrive list brief

HELP

C:\> wmic /?

WMIC is deprecated.

[global switches] <command>

The following global switches are available:
/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.

For more information on a specific global switch, type: switch-name /?


The following alias/es are available in the current role:
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.
CPU                      - CPU management.
CSPRODUCT                - Computer system product information from SMBIOS.
DATAFILE                 - DataFile Management.
DCOMAPP                  - DCOM Application management.
DESKTOP                  - User's Desktop management.
DESKTOPMONITOR           - Desktop Monitor management.
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.

For more information on a specific alias, type: alias /?

CLASS     - Escapes to full WMI schema.
PATH      - Escapes to full WMI object paths.
CONTEXT   - Displays the state of all the global switches.
QUIT/EXIT - Exits the program.

For more information on CLASS/PATH/CONTEXT, type: (CLASS | PATH | CONTEXT) /?

keywords