Command Line &
PowerShell Basics
Windows 11 includes two powerful text-based tools for
controlling the system:
✔ Command Prompt (CMD)
✔ PowerShell
Both are extremely useful for troubleshooting, automation,
system control, and advanced administration.
CMD vs PowerShell – What Is the
Difference?
CMD (Command Prompt)
• Oldest command-line tool in Windows (since MS-DOS days).
• Mostly used for simple system tasks like:
• Checking IP address
• Pinging networks
• Copying files
• Running basic commands
• Syntax is simple but limited.
• Example CMD commands:
ipconfig, ping, dir, copy, chkdsk.
PowerShell
• More advanced and modern than CMD.
• Built for automation, scripting, and system administration.
• Uses cmdlets (command-lets) like:
• Get-Process
• Get-Service
• Set-ExecutionPolicy
• Can create powerful scripts (.ps1 files).
• Works with objects, not plain text—this makes it more powerful
and flexible.
• Summary:
CMD → basic, old
PowerShell → modern, powerful, advanced automation
Common CMD Commands You Must
Know
• ✔ 1. ipconfig • ✔ 5. copy file1 file2
• Shows your IP address, Wi-Fi status, • Copies files.
network details. • ✔ 6. netstat
Example:
ipconfig /all • Shows ports and active network
connections.
• ✔ 2. ping [Link]
• ✔ 7. chkdsk
• Checks internet connection and
network delay. • Scans the disk for errors.
Example:
• ✔ 3. dir chkdsk C: /f
• Shows files and folders in the • ✔ 8. tasklist
current directory.
• Shows all running processes (like
• ✔ 4. cd <folder> Task Manager in text form).
• Changes the current directory.
PowerShell Basics & Useful Cmdlets
• PowerShell commands are called (Starts Windows Update service)
cmdlets and follow this format: • ✔ 5. Stop a service
• 👉 Verb-Noun (e.g., Get-Process) • Stop-Service -Name spooler
• ✔ 1. Check running processes (Stops the printer service)
• Get-Process • ✔ 6. Check Windows updates
• ✔ 2. Stop a process • Get-WindowsUpdateLog
• Stop-Process -Name notepad • ✔ 7. Check system info
• ✔ 3. List Windows services • Get-ComputerInfo
• Get-Service
• ✔ 4. Start a service
• Start-Service -Name wuauserv
s