Top 100 Windows CMD Commands Every Cybersecurity Engineer Should Know Because the Command Line Never Lies
So grab your Chaiiii, open CMD, and get ready to feel like the main character in a hacker movie except this time, you actually know what the commands do.
| 🧠 System Info & Diagnostics |
💡
hostname #Asking Windows "who am I?" because existential crises are fun.

💡
ver #Remind yourself which Windows version you’re trapped in.

💡
tasklist # See all running tasks before blaming "the system.

💡
taskkill /PID <id> /F #Terminate processes like a responsible digital vigilante

💡
chkdsk #Check your disk before it silently fails at 3 AM.

💡
sfc /scannow #Pray the System File Checker can undo your mistakes

💡
driverquery #See which drivers are secretly plotting against you

💡
wmic cpu get name #Admire your CPU because you can’t overclock it yet
| 🌐 Networking |
💡
ipconfig /all #Check your IP before asking "why is internet down?
💡
ping 8.8.8.8 #The universal test to see if the internet loves you today.
💡
tracert google.com #Trace the scenic route packets take across the globe.
💡
netstat -ano #Spy on all active connections like a secret agent.
💡
nslookup ashishbutle.com #Talk to DNS like you’re debugging the universe.
💡
route print #Look at your routes before getting lost in the LAN.
💡
arp -a #Peek at the devices nearby before they peek at you.
💡
netsh wlan show profiles #Reveal Wi-Fi secrets Windows has been hiding.
💡
netsh wlan export profile name="Wi-Fi" key=clear #Export your Wi-Fi like a boss.
💡
telnet #Because some nostalgia never dies.
| 🛡️ Security & User Management |
💡
net user #List users because prying is fun.
💡
net user username /add #Create users, or just annoy them.
💡
net user username * #Force password setup like a responsible admin.
💡
net localgroup administrators username /add #Give someone power, or chaos.
💡
net accounts /domain #Check password policies before HR yells at you.
💡
whoami /groups #See what groups you belong to and feel important.
💡
runas /user:Administrator cmd #Pretend to be admin without HR paperwork.
💡
gpresult /R #Audit Group Policy and judge everything silently.
💡
secedit /analyze /configure #Analyze security because you care… kinda.
| 📁 File & Directory Operations |
💡
dir #Because listing files is fun for everyone.
💡
cd #Move around directories like a true explorer.
💡
mkdir Logs #Make folders to pretend you’re organized.
💡
rmdir /S /Q OldLogs #Delete folders because they were messy anyway.
💡
copy file.txt D:\Backup #Copy files without dragging them around like a barbarian.
💡
xcopy C:\Data D:\Backup /E /H /C /I #Copy everything because one file is never enough.
💡
attrib +H secret.txt #Hide files because security through obscurity is a thing.
💡
del /F /Q *.tmp #Delete junk and feel like a digital Marie Kondo.
💡
fsutil volume diskfree C: #Check free space before complaining.
| 📡 Network Defense & Forensics |
💡
netsh advfirewall show allprofiles #Check your firewall before it betrays you.
💡
netsh advfirewall set allprofiles state off #Don’t. Just don’t.
💡
certutil #Play with certificates and feel important.
💡
wevtutil qe Security #Peek at Security logs and judge everyone.
💡
netstat -b #See which programs are talking to the internet, silently judging.
💡
nbtstat -n #Look at NetBIOS names like a nosy neighbor.
💡
arp -d #Clear ARP cache because reasons.
💡
net session #See who’s connected to your machine, creepily.
💡
getmac #Check MAC addresses like a detective.
💡
route delete #Remove routes like you control the matrix.
| 🤖 Automation & Scripts |
💡
echo Ashishbutle.com #Announce yourself to the world.
💡
if exist file.txt echo Found #Conditional logic so fancy.
💡
pause #Make your script dramatic.
💡
call script.bat #Summon another script because why not.
💡
exit #Leave the script like a responsible adult.
💡
set /p var=Enter value: #Ask the user nicely for input.
💡
find "text" file.txt #Search for text like a detective.
💡
findstr /i "password" *.txt #Search for secrets like a boss.
💡
fc file1.txt file2.txt #Compare files and argue with Windows.
| 🧰 Troubleshooting Essentials |
💡
eventvwr #Look at logs and question your life choices.
💡
msconfig #Configure startup like a wizard.
💡
dxdiag #Check DirectX because games are serious business.
💡
perfmon /report #Generate performance reports for fun.
💡
taskmgr #Call the old friend Task Manager.
💡
regedit #Edit registry and pray.
💡
services.msc #Manage services like a true admin.
💡
control sysdm.cpl #Open system properties because GUI still matters.
💡
netsh int ip reset #Reset IP and pretend it’s magic.
💡
shutdown /r /t 0 #Reboot now or regret later.
| ⚡ Bonus Fun Commands |
💡
cls #Clear your screen and feel productive.
💡
title Hacker Mode #Rename your CMD window for dramatic effect.
💡
color 0A #Make CMD green like the Matrix… because why not.
💡
prompt $P$G #Customize your prompt, impress no one.
💡
tree #See your folders in a tree… for therapy.
💡
assoc #Check file associations, because Windows loves surprises.
💡
ftype #Know which program opens what… kind of.
💡
taskkill /IM notepad.exe /F #Terminate notepad like a villain.
💡
shutdown /s /f /t 10 #Force shutdown like a merciless admin.
💡
clip < file.txt #Send text to clipboard because copy-paste is life.
💡
net use #Map drives and pretend you understand networking.
💡
net time #Check the time of other machines… time travel style.
💡
ping -t 127.0.0.1 #Ping yourself endlessly, existentially.
💡
telnet towel.blinkenlights.nl #Watch Star Wars in ASCII like a legend.
💡
tree /F #All files in a tree… madness included.
💡
compact /c file.txt #Compress files and feel like a magician.
💡
expand file.txt #Expand files, because CMD is all about opposites.
💡
driverquery /v #Verbose driver info, because details matter.
💡
netstat -s #Statistics for those who love numbers.
💡
path #Show PATH and pretend you understand environment variables.
💡
systeminfo | find "Hotfix" #Find installed patches, spy on updates.
💡
whoami /priv #Check your privileges, brag silently.
💡
net accounts #Check policy, feel like HR.
💡
fsutil file createnew newfile.txt 1000 #Create files for testing, because why not.
💡
net config workstation #Know your machine’s network personality.
💡
echo %USERNAME% #Remind yourself who’s in charge here.