Most Windows users open Command Prompt only to run a specific command or fix a problem. But this built-in tool offers more than just typing commands and pressing Enter. Windows 11 includes several handy Command Prompt tricks that can make everyday tasks easier, whether you’re managing files, checking network details, or working with system settings. Some are simple shortcuts that save you from typing the same commands repeatedly, while others let you do tasks not immediately available through the usual Windows interface. You might already know a few, but others are easy to overlook. In this guide, we’ll look at 10 useful but lesser-known Command Prompt tricks in Windows 11, with simple examples showing how to use each one.
1. Clear the Command Prompt Screen Without Closing It
When you run several commands in Command Prompt, the window can quickly fill up with text and results. Instead of closing it and opening a new window, you can clear everything from the screen with a simple command.
Open Command Prompt, type the following command, and press Enter:
cls
This immediately clears the visible Command Prompt screen while keeping the current session open. You can continue running commands without reopening the window.
Quick Insight: The cls command only clears the visible screen. It doesn’t delete files, change system settings, or erase your command history.
2. Repeat the Last Command Without Typing It Again
Sometimes you run a command and need to execute it again, perhaps because you want to check updated information or repeat a troubleshooting step. Instead of typing the entire command again, Command Prompt lets you quickly recall previously entered commands.
Press the Up Arrow key to recall the last command you executed. Press Enter to run it again.
If you want to access older commands from the current session, keep pressing the Up Arrow key to move further back through the history.
You can also display your command history by running:
doskey /history

This displays the commands you’ve entered during the current Command Prompt session.
Quick Insight: This is particularly useful when working with long commands or troubleshooting Windows problems that require running the same command multiple times.
3. Find Your Saved Wi-Fi Password Using Command Prompt
Forgot your Wi-Fi password or need to connect another device to a network you’ve used before? If Windows has saved the wireless network credentials, you can retrieve the password through Command Prompt.
First, open Command Prompt and run:
netsh wlan show profiles
This displays a list of Wi-Fi network profiles saved on your computer. Find the network name (SSID) whose password you want to check.
Next, replace WiFiName with your actual network name and run:
netsh wlan show profile name="WiFiName" key=clear
Look under the Security settings section for Key Content. If Windows has the password saved and makes it available, you’ll see it there.

Quick Insight: This works only for wireless networks whose profiles are saved on your computer. Keep in mind that anyone with access to this information could use it to connect to your network.
4. Open Any Folder Directly from Command Prompt
You don’t always need to navigate through File Explorer to access a folder. Command Prompt includes a simple way to open any folder directly in File Explorer.
For example, to open your Downloads folder, run:
explorer "%USERPROFILE%\Downloads"
Similarly, you can open the Documents folder using:
explorer "%USERPROFILE%\Documents"
You can also open a specific folder by providing its complete path:
explorer "C:\Program Files"
Windows will open the selected location in a File Explorer window.

Quick Insight: This trick is useful whenever you’re working in Command Prompt and need to quickly access a folder without manually navigating through File Explorer.
5. Create a Wi-Fi Network Report
Windows includes a built-in wireless network reporting feature that generates an HTML report containing useful information about your computer’s Wi-Fi activity.
This report helps troubleshoot frequent Wi-Fi disconnections, connection failures, or wireless adapter problems.
To generate the report, open Command Prompt as administrator and run:
netsh wlan show wlanreport
Windows will generate an HTML report containing information such as wireless connection sessions, connection errors, network adapter details, and reasons for certain disconnections.
After the command finishes, it displays the location of the generated report. You can also check the following folder:
C:\ProgramData\Microsoft\Windows\WlanReport\
Look for the latest WLAN report HTML file and open it in your browser.

Quick Insight: The wireless network report provides an overview of recent Wi-Fi activity, making it easier to identify recurring connection problems.
6. Check Which Programs Are Running on Your Computer
If your computer feels slow or you want to see which applications and background processes are running, you can use Command Prompt instead of Task Manager.
Enter the following command:
tasklist
Windows displays a list of running processes, their process IDs (PID), and memory usage.
You can also search for a specific application. For example, to check whether Chrome is running, use:
tasklist | find "chrome"
This filters the output and displays matching Chrome processes.
If an application becomes unresponsive, you can terminate a particular process using its PID:
taskkill /PID 1234 /F
Replace 1234 with the actual process ID shown in the Tasklist results.
Quick Insight: Be careful when terminating processes. Closing essential Windows processes can cause applications or system features to stop working properly.
7. Find Your Windows Product Key
To check whether your computer has an original Windows product key embedded in its firmware, use Command Prompt to retrieve it.
Open Command Prompt and run:
wmic path softwarelicensingservice get OA3xOriginalProductKey
If your computer has an OEM product key embedded in its UEFI firmware, Windows may display it in the results.
However, this command doesn’t retrieve every type of Windows license key. Digital licenses and some volume licensing arrangements may not expose a product key through this method.
Also, WMIC is a deprecated Windows utility, so the command may not work on every Windows 11 installation.
Quick Insight: If the result is blank, it doesn’t necessarily mean Windows isn’t activated. Check your activation status in Settings > System > Activation.

8. Compare Two Files Using Command Prompt
If you have two text files and want to check whether their contents are different, you don’t need to open them separately and compare every line manually.
Command Prompt includes a built-in fc (File Compare) command that checks two files and displays their differences.
For example:
fc "C:\Users\User\Desktop\file1.txt" "C:\Users\User\Desktop\file2.txt"
Replace the file paths with the actual locations of your files.
Command Prompt compares their contents and displays the differences it finds. If both files are identical, it reports no differences.
Quick Insight: The fc command is particularly useful for comparing configuration files, text documents, and troubleshooting logs.
9. Find Your Computer’s IP Address and Network Details
You probably know that Command Prompt can display your computer’s IP address, but the ipconfig command provides more network information than many users realize.
Open Command Prompt and enter:
ipconfig /all
Windows displays detailed network configuration, including:
- IPv4 and IPv6 addresses.
- Default gateway.
- DNS servers.
- Physical (MAC) address.
- DHCP status.
- Network adapter details.

This information helps you troubleshoot internet connectivity, check network configurations, or identify problems with your Wi-Fi or Ethernet connection.
Quick Insight: If you only need your current IP address and basic network information, use ipconfig without the /all parameter.
10. Shut Down or Restart Your PC Using Command Prompt
You don’t always need to use the Start menu to shut down or restart Windows 11. Command Prompt includes the shutdown command, which lets you perform these actions directly.
To shut down your computer immediately, run:
shutdown /s /t 0
To restart Windows immediately, use:
shutdown /r /t 0
You can also schedule a shutdown after a specific period. For example:
shutdown /s /t 300
This schedules your computer to shut down after 300 seconds (five minutes).
If you change your mind before the countdown finishes, cancel the scheduled shutdown with:
shutdown /a
Quick Insight: The /s parameter shuts down Windows, /r restarts it, and /t specifies the delay in seconds.
Final Thoughts
Command Prompt still offers plenty of useful features that can make everyday Windows 11 tasks easier. From retrieving saved Wi-Fi passwords and checking network information to comparing files and managing running processes, these tricks can save time and help you troubleshoot common PC problems.
You don’t need to memorize every command at once. Start with the ones you use daily, then gradually explore the others. Once you become familiar with them, you’ll find Command Prompt is much more than just a tool for running basic troubleshooting commands.






