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. wmic utility provides a command-line interface for Windows Management Instrumentation(WMI). Windows command line lovers can use this utility to query WMI entries. We will see some real world examples of wmic command in below section. More on Microsoft docs.
Also Read: Useful net command examples to Manage Windows Resources
If you want to check the state of all global switches in windows then you need to use wmic context command as shown below.
If you want to check your system serial number then you need to use wmic bios get serialnumber command as shown below.
If you want to check the HotfixID of all the installed updates in windows then you need to use wmic qfe list command as shown below.
NOTE:
Please note that it is possible that some of the updates will show in "View Installed Updates" section but not on wmic qfe list output.
If you want get the list of all the installed applications in your Windows system then you need to use wmic product get name command as shown below.
If you want to get the total count of installed updates in windows then you need to use wmic qfe list | find /c /v “” command as shown below.
If you want to check the total number of CPU Cores in your system then you need to use wmic cpu get numberofcores command as shown below. As you can see my system has 4 CPU Cores.
If you are looking to check the process Id of a running program then you need to use wmic process where ExecutablePath='<process_executable_path>’ get ProcessId syntax. In this example we are checking the Process Id of notepad.exe using wmic process where ExecutablePath=’C:\\windows\\system32\\notepad.exe’ get ProcessId command as shown below.
If you want to check the System Bios Version then you need to use wmic bios get version command as shown below.
If you are looking to check all the logged in to users in a remote system then you can use below wmic command. In this example we are checking all currently logged in users in 192.168.27.103 system by using wmic /node:192.168.157.128 /user:administrator /password:p@ssw0rd computersystem get username command as shown below.
NOTE:
wmic /node:192.168.157.128 /user:administrator /password:p@ssw0rd computersystem get TotalPhysicalMemory
If you want to check all the logs related to explorer then you need to use wmic ntevent where (message like “%explorer%”) list brief command as shown below.
If you want to check the ProductID of your System then you need to use wmic csproduct get name command as shown below.
If you want to check all the current running processes then you need to use wmic process list command as shown below.
If you want to get the full executable path of any specific process then you need to use wmic process where “name=<process_name>” get ProcessID,ExecutablePath syntax. In this example, we are checking the executable path of chrome.exe process using wmic process where “name=chrome.exe” get ProcessID, ExecutablePath command as shown below.
If you want to get the executable path of all the running process then you need to use wmic process get ProcessID,ExecutablePath command as shown below.
If you want to check all the information about System CPU then you can use wmic CPU Get DeviceID,NumberOfCores,NumberOfLogicalProcessors command as shown below.
If you want to check the Windows OS version then you need to use wmic os get version command as shown below.
If you want to check the status about your System slots then you can use wmic systemslot get slotdesignation,currentusage,description,status command as shown below.
If you want to get the system sensor status then you need to use wmic temperature get deviceid,name,status command as shown below.
If you want to check all the System I/O ports then you need to use wmic port get name command as shown below.
If you want to check all the option available with wmic command then you need to use wmic /? command as shown below.
With the continuous development of technology, cyber attacks through the Internet are also becoming more and more diverse. And if businesses…
Nmap (Network Mapper) is a security scanning, monitoring and evaluation tool for a network system developed by Gordon Lyon (also…
Tools New Vulnerability Scanners for Cybersecurity Professionals 1. Astra Vulnerability Scanner Features: Scanner Capabilities: Web and Mobile Applications, Cloud Infrastructure, API,…