Windows/wmic

From Omnia
Revision as of 16:20, 27 January 2021 by Kenneth (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

wmic

Windows Management

WARNING: WMIC is deprecated! (warning from "wmic /?")

Get Motherboard Serial Number

C:\> echo "" | wmic bios get serialnumber
SerialNumber
R9HWGD7

Windows QFE

See Windows_10/Windows_Update_History

wmic qfe list

List Disk and Network Drives

Loop volume verify: [1]

@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: [2]

wmic logicaldisk get name

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

wmic diskdrive list
wmic diskdrive list brief

keywords