
Windows Management Instrumentation Command-line (WMIC) is a powerful tool that allows users to interact with the Windows Management Instrumentation (WMI) infrastructure from the command line. This article explores 20 useful WMIC command examples that can help users gain insights into various aspects of their Windows systems, from hardware details to running processes.
1. Display the State of all Global Switches in Windows:
C:\>wmic context
Use this command to check the state of all global switches in Windows.
2. Get Your System Serial Number:
C:\>wmic bios get serialnumber
Retrieve your system’s serial number with this command.
3. Check HotFixID of Installed Updates:
C:\>wmic qfe list
View the HotFixID of all installed updates in Windows.
4. List all Installed Applications:
C:\>wmic product get name
Obtain a list of all installed applications on your Windows system.
5. Count the number of Installed Updates:
C:\>wmic qfe list | find /c /v “”
Get the total count of installed updates in Windows.
6. Get the Total Number of CPU Cores:
C:\>wmic cpu get numberofcores
Check the total number of CPU cores in your system.
7. Find the Process Id of a Running Program:
C:\>wmic process where ExecutablePath=’C:\\windows\\system32\\notepad.exe’ get ProcessId
Identify the Process Id of a running program, like Notepad in this example.
8. Get the System Bios Version:
C:\>wmic bios get version
Check your system’s BIOS version with this command.
9. Check All Users Logged in to a Remote System:
C:\>wmic /node:192.168.27.103 /user:admin /password:pass123 computersystem get username
Verify all logged-in users on a remote system.
10. Check Logs Related to Explorer:
C:\>wmic ntevent where (message like “%explorer%”) list brief
Examine logs related to the Explorer process.
11. Get the Product ID of Your System:
C:\>wmic csproduct get name
Retrieve the Product ID of your system.
12. List all Running Processes:
C:\>wmic process list
View a list of all currently running processes.
13. Get the Executable Path of a Running Process:
C:\>wmic process where “name=’chrome.exe'” get ProcessID, ExecutablePath
Obtain the full executable path of a specific process, like Chrome in this example.
14. Get the Executable of all Processes:
C:\>wmic process get ProcessID,ExecutablePath
Retrieve the executable path of all running processes.
15. Get Information about System CPU:
C:\>wmic CPU Get DeviceID,NumberOfCores,NumberOfLogicalProcessors
Check detailed information about the system CPU.
16. Get Windows OS Version:
C:\>wmic os get version
Determine the version of the Windows operating system.
17. Get System Slot Status:
C:\>wmic systemslot get slotdesignation,currentusage,description,status
Check the status of your system’s slots.
18. Get System Sensor Status:
C:\>wmic temperature get deviceid,name,status
Obtain the status of system sensors, like temperature sensors.
19. List all System I/O Ports:
C:\>wmic port get name
Check all system I/O ports with this command.
20. Check All Options Available with WMIC:
C:\>wmic /?
Explore all available options and syntax with this command.
Conclusion:
WMIC commands provide a versatile and efficient way to manage and gather information about your Windows system. Whether you’re a system administrator or an enthusiast, incorporating these commands into your toolkit can enhance your ability to troubleshoot, monitor, and optimize your Windows environment.
You may also like:- Top 6 Advanced Techniques in Penetration Testing
- Top 4 Advanced Metasploit Techniques for Penetration Testers
- Exploit Writing for Beginners – A Step-by-Step Guide
- 15 Essential Windows Command Prompt Commands for Everyday Use
- Most Common DNS Record Types and Their Roles
- Top Skills Needed to Become a Cybersecurity Analyst
- Edit and Compile Code with the Best 5 Code Editors
- 50+ Top DevSecOps Tools You Need To Know
- Learn How to Add Proxy and Multiple Accounts in MoreLogin
- Some Useful PowerShell Cmdlets