Saturday, June 16, 2007

Windows Management Instrumentation Command-line (WMIC) tool

I previously posted an article regarding wbemtest that can be utilized in performing wmi query.

I recently visited M$oft and found an article on wmi command-line.

It was a good read and I was pleased to know that it provides you a simple command-line interface to Windows Management Instrumentation (WMI).

If you’ve never used WMIC, open a command prompt and type: WMIC

You should get a brief installation message followed by a WMIC prompt. You can type exit to return to the command prompt. WMIC has an interactive mode like NSLOOKUP or you can access it directly from the command line.

For example, run "wmic os get caption,csdversion", then you should get something like this:

Caption CSDVersion
Microsoft Windows XP Professional Service Pack 2


Type WMIC /? to view more info.

Note:
Use the /RECORD global switch to redirect WMIC output to a file.


If at first you fail, call it version 1.0

No comments: