WHAT IS WMIC ? USEFUL WMIC COMMAND EXAMPLES IN WINDOWS ( PART 3 )
The Windows Management Instrumentation Command line (WMIC) is a software utility that allows users to performs Windows Management Instrumentation (WMI) operations with a command prompt.
WMIC operates in two modes, interactive (which allows commands to be entered one line at a time) and non-interactive (which allows commands to be scripted for use in batch files). The simplest way to launch WMIC is to open a Run dialog and type wmic. Windows users can review a complete listing of aliases and global switches by typing /? at the wmic prompt.
In this example I will take you through useful wmic command examples in Windows. Check all the options available with wmic command. If you want to check all the option available with wmic command then you need to use wmic /? command as shown below.
Common WMIC queries
How To Find Out The Model Of Your Computer ?
In order to find out the model name of a machine using WMI, simply follow the guide below:
Go into a command prompt and Type in
>WMIC ComputerSystem GET Model
then, you will get:
Model HP Notebook
How to Find Your Computer Name ?
>wmic computersystem get name,systemtype
output:
Name : yourcomputername
SystemType : x64-based PC
How to Find the Serial Number of your computer ?
>wmic bios get serialnumber
One more command will help you to identify the Serial Number of your Computer
>wmic csproduct get identifyingnumber
How to Find the MAC Address of Your Computer ?
>wmic nic get macaddress,description
How to Check Your Motherboard Model Number ?
>wmic baseboard get product,Manufacturer,version,serialnumber
How to check physical memory of your computer ?
>wmic COMPUTERSYSTEM get TotalPhysicalMemory
How to get all running programs and memory usage ?
>wmic process get workingsetsize,commandline
This lists the program and the memory usage
How to get partition name size and type ?
>wmic partition get name,size,type
How to get computer manufacturer ?
>WMIC COMPUTERSYSTEM GET MANUFACTURER
output : HP
How get mode version ?
>wmic csproduct get version
output: Type1ProductConfigId
System Information
This program can also provide details on many other aspects of your system.
>wmic service list brief
>wmic process list brief
>wmic startup list brief
will list your installed software, services, running processes and Windows startup programs, for instance.
Process Management
Using WMIC you can manage your computer process like, close all the instances of a particular program. For example, if you want to shut down all FireFox windows, for instance, then the command:
>wmic process where name="firefox.exe" call terminate
Write WMIC output to file
In order to do so, simply use the /output: “< filepath & name >” switch. Insert this right after the wmic, but before any other part of the command: for instance, wmic /output:”C:\output.txt” , then the output will export the output.txt file.