Operating system Command
Windows Command:
1. help
Description: Lists all available commands in the Command Prompt with a brief
description.
Example: help
2. cls
Description: Clears the Command Prompt screen.
Example: cls
3. cd
Description: Changes the current directory.
Example: cd C:\Users\YourUsername\Documents
4. dir
Description: Lists all files and folders in the current directory.
Example: dir
5. copy
Description: Copies files from one location to another.
Example: copy C:\source\file.txt D:\destination
6. move
Description: Moves files from one location to another.
Example: move C:\source\file.txt D:\destination
7. del
Description: Deletes one or more files.
Example: del C:\source\file.txt
8. mkdir
Description: Creates a new directory.
Example: mkdir C:\new_folder
9. rmdir
Description: Deletes a directory (folder).
Example: rmdir C:\new_folder
10. ipconfig
Description: Shows network configuration details, such as IP address and subnet mask.
Example: ipconfig
11. ping
Description: Tests network connectivity to a remote host.
Example: ping google.com
12. tracert
Description: Shows the path taken to a destination IP address.
Example: tracert google.com
13. netstat
Description: Displays active network connections and listening ports.
Example: netstat -an
14. tasklist
Description: Lists all running processes on the system.
Example: tasklist
15. taskkill
Description: Ends a running process by its name or PID.
Example: taskkill /IM notepad.exe
16. systeminfo
Description: Shows detailed system information.
Example: systeminfo
17. chkdsk
Description: Checks for disk errors and repairs them.
Example: chkdsk C: /f
18. sfc /scannow
Description: Scans and repairs corrupted system files.
Example: sfc /scannow
19. diskpart
Description: Manages disks, partitions, and volumes.
Example: diskpart
20. format
Description: Formats a disk for use with Windows.
Example: format D:
21. shutdown
Description: Shuts down, restarts, or logs off the computer.
Example: shutdown /r /t 0 (Restarts the computer immediately)
22. powercfg
Description: Configures power settings and displays energy efficiency details.
Example: powercfg /hibernate on
23. gpupdate
Description: Forces a Group Policy update.
Example: gpupdate /force
24. gpresult
Description: Displays applied Group Policy settings.
Example: gpresult /R
25. regedit
Description: Opens the Windows Registry Editor.
Example: regedit
26. sc config
Description: Configures Windows services.
Example: sc config Spooler start= auto
27. sc start / stop
Description: Starts or stops a Windows service.
Example: sc start Spooler (Starts the Print Spooler service)
28. net start / stop
Description: Starts or stops network services.
Example: net start Spooler
29. net use
Description: Maps or disconnects network drives.
Example: net use Z: \\server\share
30. net user
Description: Manages user accounts.
Example: net user username password /add
31. hostname
Description: Displays the computer’s hostname.
Example: hostname
32. set
Description: Displays, sets, or removes environment variables.
Example: set PATH
33. date
Description: Displays or sets the current date.
Example: date
34. time
Description: Displays or sets the current time.
Example: time
35. echo
Description: Displays a line of text.
Example: echo Hello, world!
36. pause
Description: Pauses execution in a batch file.
Example: pause
37. attrib
Description: Displays or changes file attributes.
Example: attrib +r file.txt
38. assoc
Description: Displays or modifies file type associations.
Example: assoc .txt=txtfile
39. cipher
Description: Encrypts or decrypts files.
Example: cipher /e C:\secret_folder
40. cacls
Description: Changes file permissions.
Example: cacls file.txt /g username:f
41. fc
Description: Compares two files and displays differences.
Example: fc file1.txt file2.txt
42. find
Description: Searches for text within files.
Example: find "keyword" file.txt
43. schtasks
Description: Manages scheduled tasks.
Example: schtasks /create /tn Backup /tr "backup.bat" /sc daily /st
02:00
44. wmic
Description: Windows Management Instrumentation Command-line to get system info.
Example: wmic os get name
45. driverquery
Description: Lists all installed drivers.
Example: driverquery
46. shutdown /s /f /t 0
Description: Instantly shuts down the computer.
Example: shutdown /s /f /t 0
47. whoami
Description: Displays the current user and domain.
Example: whoami
48. title
Description: Sets the Command Prompt window title.
Example: title My Custom Command Prompt
49. pathping
Description: Combines ping and tracert for a detailed path analysis.
Example: pathping google.com
50. route
Description: Displays and modifies the IP routing table.
Example: route print
WMIC:
WMIC (Windows Management Instrumentation Command-line) commands, which are
powerful tools for querying and managing system information on Windows:
1. Get Operating System Information
Command: wmic os get caption, version, architecture
Description: Retrieves the operating system name, version, and architecture.
Example Output: Microsoft Windows 10 Pro 10.0.19041 x64
2. Get Computer System Information
Command: wmic computersystem get model, manufacturer, name, systemtype
Description: Displays details about the computer system model, manufacturer, name,
and system type.
Example Output: Dell Inc. XPS 13 9370 Desktop
3. List Installed Software
Command: wmic product get name, version
Description: Lists all installed software on the system with their versions.
Note: This command may take a while to run and may not show all software.
Example Output: Microsoft Office 365 16.0.12325.20288
4. Get CPU Information
Command: wmic cpu get name, numberofcores, maxclockspeed
Description: Shows details about the CPU, including its name, number of cores, and max
clock speed.
Example Output: Intel(R) Core(TM) i7-8565U CPU 1800 MHz
5. Get Hard Drive Information
Command: wmic diskdrive get model, size, status
Description: Provides details on the installed hard drives, including model, size (in
bytes), and status.
Example Output: Samsung SSD 970 EVO 500GB Healthy
6. Get Memory (RAM) Information
Command: wmic memorychip get capacity, speed, manufacturer
Description: Displays information on each installed memory module, including capacity
(in bytes), speed, and manufacturer.
Example Output: 8 GB 2666 MHz Samsung
7. Get Network Adapter Information
Command: wmic nic get name, macaddress, speed
Description: Lists network adapters, including their MAC addresses and speeds.
Example Output: Intel(R) Wi-Fi 6 AX201 2400 Mbps 00-1A-2B-3C-4D-5E
8. Check Battery Status (for laptops)
Command: wmic path win32_battery get estimatedchargeRemaining,
batterystatus
Description: Provides information on the battery status, including the remaining charge
percentage.
Example Output: Estimated Charge Remaining: 85%
9. Get BIOS Information
Command: wmic bios get manufacturer, smbiosbiosversion, serialnumber
Description: Displays BIOS information such as the manufacturer, version, and serial
number.
Example Output: Dell Inc. 1.8.1 F7G8J5B
10. Get List of Running Processes
Command: wmic process get name, processid
Description: Lists all currently running processes with their process IDs (PIDs).
Example Output: explorer.exe 1234