Friday, April 24, 2009

WMIC Quips Tips Flips and Blips

WMIC, or WMI Command-line, or Windows Management Instrumentation Command-line, or whatever, is a condensed-form utility for running queries, pushing updates, and performing various WMI-related stuff via the CMD console.

It's very handy for quick checks on what your system is doing. For example:

> wmic os list brief

Will show you a top-level summary of your operating system information. In my case it shows the following:

BuildNumber Organization RegisteredUser SerialNumber SystemDirectory Version
7068 [blank] dood 00000-0... C:\Windows\system32 6.1.7068

Due to word-wrapping issues with Blogger, it's a bit easier to force a reformatting as:

BuildNumber: 7068
Organization:
RegisteredUser: dood
SerialNumber: 00000-000-0000000-00000
SystemDirectory: C:\Windows\System32
Version: 6.1.7068

Another useful query is:

> wmic os list free

This will dump a report of "free" physical and virtual memory, virtual page file space and the full name of your operating system:

FreePhysicalMemory: 1932116
FreeSpaceInPagingFiles: 3143596
FreeVirtualMemory: 4976816
Name: Microsoft Windows 7 Ultimate C:\Windows\Device\Harddisk0\Partition2

These are just two quick examples obviously. To find out more, open a CMD console on Windows XP, Vista or Windows 7 (or Windows Server 2003 or 2008 as well), and type "wmic -?" or drill-down like "wmic os -?" and it will provide syntax information for how to use this properly.
Post a Comment