The Windows WMI Command Line Utility
Windows Management Instrumentation (WMI) allows you to write scripts and expose information about a Windows 7 resource or service. As we have seen in the previous post – Windows Management Instrumentation (WMI), WMI allows you to access system management information from the command-line interface! WMI can become handy when you need to retrieve specific information which may be not available from the GUI. Mastering the WMI command line utility may turn you into command line freak never wanting to leave the command line.
Let’s see some simple examples, open a command prompt window and run the following commands:
To get information about your system memory including speed, slot location, size and description type:
wmic memorychip get Speed, Description, BankLabel, Tag, Capacity, DeviceLocator
A typical output of this command is shown below:
BankLabel Capacity Description DeviceLocator Speed Tag
Bank0/1 2147483648 Physical Memory DIMM1 667 Physical Memory 0
To get information about your system BIOS including revision and manufacturer type:
wmic bios get Manufacturer, SMBIOSBIOSVersion
A typical output of this command is shown below:
Manufacturer SMBIOSBIOSVersion
Phoenix Technologies, LTD ASUS P5N-MX ACPI BIOS Revision 0402
To get information about your system hard drives including connected flash drives, type:
wmic logicaldisk get Caption, Description, Filesystem
A typical output of this command is shown below:
Caption Description FileSystem
C: Local Fixed Disk NTFS
D: CD-ROM Disc
E: Removable Disk
F: Removable Disk FAT
Drives that do not show a FileSystem type indicate an empty slot inside your computer for connecting removable storage devices and cards. The flash drive in this particular case is drive F with FAT FileSystem.