Commands Reference
A comprehensive guide to useful commands for networking, system monitoring, and troubleshooting.
Table of contents
- Network Commands
- System Monitoring
- Email Diagnostics
- Performance Analysis
- Troubleshooting Commands
- Advanced Commands
- Best Practices
- Additional Resources
Network Commands
Basic Connectivity
# Test network connectivity
ping google.com
# Trace route to destination
tracert google.com
# View network configuration
ipconfig /all
💡 Ping Options
Use ping -t for continuous ping, Ctrl+C to stop. Add -n [number] to specify ping count.
DNS Commands
# DNS lookup
nslookup google.com
# Check MX records
nslookup -type=mx gmail.com
# Check TXT records (SPF, DKIM)
nslookup -type=txt domain.com
DHCP Commands
# Release DHCP lease
ipconfig /release
# Renew DHCP lease
ipconfig /renew
# Display DHCP information
ipconfig /displaydns
⚠️ Network Disruption
Release and renew commands will temporarily disconnect you from the network.
System Monitoring
CPU & Memory
# Open Task Manager
taskmgr
# View CPU information
wmic cpu get name, numberofcores, maxclockspeed
# View memory information
wmic memorychip get capacity, speed
# Resource monitor
resmon
Disk & Storage
# Check disk space
dir
chkdsk
# View disk information
wmic diskdrive get size, model
# System file check
sfc /scannow
Process Management
# List running processes
tasklist
# Kill process by name
taskkill /IM "process.exe"
# Kill process by ID
taskkill /PID 1234
Email Diagnostics
Server Tests
# Test SMTP connection
telnet smtp.gmail.com 587
# Check mail server
nslookup -type=mx domain.com
# View email headers
Received: from mail-yw1-f41.google.com
Authentication
# Check SPF record
nslookup -type=txt domain.com
# View DMARC policy
nslookup -type=txt _dmarc.domain.com
Performance Analysis
System Information
# Detailed system info
systeminfo
# List installed programs
wmic product get name
# View startup programs
wmic startup list brief
Network Performance
# Network statistics
netstat -an
# Network interface statistics
netstat -e
# Protocol statistics
netstat -s
📝 Real-time Monitoring
Add -p to netstat commands for continuous monitoring.
Troubleshooting Commands
Network Reset
# Reset TCP/IP
netsh int ip reset
# Reset Winsock
netsh winsock reset
# Flush DNS cache
ipconfig /flushdns
System Cleanup
# Disk cleanup
cleanmgr
# Check system files
sfc /scannow
# Clear temporary files
del /s /q %temp%\*
Advanced Commands
Power Management
# Power configuration
powercfg /energy
# Battery report
powercfg /batteryreport
# Sleep study
powercfg /sleepstudy
System Recovery
# System restore
rstrui.exe
# Startup repair
shutdown /r /o
# Check disk
chkdsk /f
Best Practices
Command Usage
- Always run as administrator when required
- Document commands and results
- Use help flags for more information
- Be careful with destructive commands
Safety Tips
- Back up data before major changes
- Verify commands before execution
- Keep system restore points
- Document configuration changes
❗ Administrative Rights
Many system commands require administrator privileges. Right-click Command Prompt and select 'Run as administrator'.
Additional Resources
- Command Cheatsheet
- Microsoft Command Line Reference
- PowerShell Documentation
- System Administration Guides