Commands Reference

A comprehensive guide to useful commands for networking, system monitoring, and troubleshooting.

Table of contents

  1. Network Commands
    1. Basic Connectivity
    2. DNS Commands
    3. DHCP Commands
  2. System Monitoring
    1. CPU & Memory
    2. Disk & Storage
    3. Process Management
  3. Email Diagnostics
    1. Server Tests
    2. Authentication
  4. Performance Analysis
    1. System Information
    2. Network Performance
  5. Troubleshooting Commands
    1. Network Reset
    2. System Cleanup
  6. Advanced Commands
    1. Power Management
    2. System Recovery
  7. Best Practices
    1. Command Usage
    2. Safety Tips
  8. 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

Back to top

Copyright © 2025 Malinda Rathnayake. Distributed under an MIT license.