Although Windows settings provide easy access for configuring most things, the Command Prompt — elevated or otherwise — can be indispensable in a number of scenarios, especially when you know how to take advantage of it.
Sometimes settings can be applied by typing a few characters instead of clicking through a series of menus, while other times there simply isn’t any other way to perform an operation except with command lines.
We’ve compiled a list of things that you can do in the Windows Command Prompt, including some commands everyone should know for general usage, more advanced ones for tweaking or troubleshooting your PC, as well as lesser known and less practical Command Prompt features. Our list of tips and tricks below has been organized from briefest and most useful, to more complex and risky…
Since you might be testing some commands… pressing Ctrl + C will cancel a command that you’ve already entered and allow you to begin typing another one, while typing cls will clear the current window of any commands that you’ve entered.
Directory paths don’t have to be typed in the first place. Aside from being able to copy/paste text and tab through directories, you can drag and drop a folder directly into the Command Prompt window to automatically insert the location.

The command prompt used to scale pretty poorly and show very small text, but now it’s been modernized so you can zoom in just like you do in a web browser. Use Ctrl + Mouse Wheel Up/Down to zoom in and out text.
Right-click the title bar and open Properties for settings that include the ability to change your Command Prompt’s font, layout and colors, as well as options such as Quick Edit mode, which will automatically paste text from your clipboard when you right click in the window.
Bonus: You can also customize the text in the top bar by typing title followed by the text that you want (example: title My title was pasted with Quick Edit mode).Tapping the up and down arrows on your keyboard will cycle through commands that you’ve previously entered. More shortcuts:
Tab: When you’re typing a folder path, tab will auto-complete and cycle through directories
Ctrl + M: Enables Mark Mode which lets you move the cursor in all directions with the arrow keys
Ctrl + C or V: As of Windows 10, you can copy and paste with Ctrl + C and V like elsewhere around the OS
Ctrl + F: Likewise, Ctrl + F now lets you search for text in the Command Prompt
Ctrl + Shift + Scroll on your mouse: Increases or decreases the window transparency (+ and – keys work too)
Alt + Enter: Enables full-screen mode with no title bar displayed on top (F11 also works like elsewhere in Windows)
Adding && between commands will let you enter multiple lines at once to be executed in succession. Example:
tasklist && netstat -b
Entering tasklist command will list all of the processes running on your machine along with details such as their process identifier and memory usage, while netstat -b will generate a list of all the processes with an established network connection.There are many ways to generate a list of drivers in the Command Prompt, here’s one line that includes additional information such as the status of a device and the folder location/file name of the associated driver:
driverquery /FO list /v
You can save the output of a command such as tasklist or driverquery to a new text file by adding > along with a directory and file name. Example:
driverquery > C:UsersTechSpotDesktopoutput.txt
The function (F) keys on the top of your keyboard are also shortcuts that mostly re-enter previous commands without retyping them.
The Windows Terminal was introduced in the more recent version of Windows as is available as a free download from the Microsoft Store. The Terminal is a modernized command line tool that adds a tabbed interface in which you can open multiple command lines, but also the PowerShell, SSH connections and the Windows Subsystem for Linux (WSL), making it a very versatile option for command line users.
The Windows Terminal is getting frequent updates and support for modern features such as GPU accelerated text rendering, which paves the way for icon and emoji support, as well as significantly faster text display.Some of the temporary files on your drive can be deleted with the following commands (/q runs the operation without a confirmation prompt, /f ignores the read-only attribute and forces deletion, /s deletes contents from all sub-folders):If that didn’t empty enough storage, here are more temp folder locations, and we recently covered a bunch of ways to free up space on Windows, including Command Prompt methods to launch an advanced Disk Cleanup tool and another to disable hibernation by deleting the feature’s system file (hiberfil.sys).
Entering osk into a Command Prompt opens Windows’ on-screen keyboard which lets you click keys with your mouse instead of typing them.
The “shutdown” command can be used with a range of switches to shutdown, reboot and more, including the ability to force applications closed, to display a message on shutdown, and to specify the number of seconds you’d like before the operation happens. Example: shutdown -s -t 3600 would shutdown your PC in one hour.
If your network adapter supports the feature, you can configure your PC to be a wireless hotspot from the Command Prompt.
How to check if your hardware is capable: Enter netsh wlan show drivers and look for the line that reads “Hosted network support: Yes.”From there, you can enable the hotspot with this command: netsh wlan set hostednetwork mode=allow ssid=YOURSSID key=YOURPASSWORD
Also enter this line to enable the hotspot: netsh wlan start hostednetwork (stop works too) and you can check the status of your new hotspot by entering netsh wlan show hostednetwork.
You may also have to navigate through some GUI menus to enable connection sharing (we couldn’t find a way to do this from the Command Prompt): Go to Network and Sharing > Change adapter settings (Control PanelNetwork and InternetNetwork Connections) and you should see the network adapters connected to your PC.
Right click the device that is connected to the Internet (not your new hotspot if that’s listed) and open Properties. In the Sharing tab, check the box to “Allow other network users to connect through this computer’s Internet connection.”Among other netsh commands, the feature can show your Wi-Fi password by entering netsh WLAN show profile name=YOURPROFILE key=clear (look under Security settings > Key Content).
This line can delete a network profile you’re no longer using: netsh WLAN delete profile name=YOURPROFILE
Trouble with your connection? ipconfig has some go-to commands to resolve the issue:For persistent issues with your connection, there are some more elaborate commands that are worth trying. Note that you may have to reconfigure your network adapter etc. if you have manual settings, particularly when resetting TCP/IP and the Windows Firewall.
These commands require a reboot.Are you greeted with a message that reads “reboot and select proper boot device?” or “NTLDR is missing” when you turn on your PC? The method below has worked for us to repair a Windows 8 machine and should be valid for other editions of Windows.
Note that these lines must be entered in a Command Prompt that is opened in a recovery environment from outside of your operating system, such as from a bootable USB drive with Windows 10 / Windows 11 installation media.Although that sequence has worked for us in the past, we tested this on a virtual machine by deleting the system reserved partition (where boot information is stored) and trying to restore the bootable state by entering those lines. Unfortunately, access was denied for bootrec /fixboot and we couldn’t find a workaround, so Windows still couldn’t load.
However, these bcdboot and bootsect commands worked to get Windows booting again, even though we just reformatted the system partition:
*Note: If you are trying to run bcdboot C:Windows from a recovery console outside of your Windows installation (such as from the Windows 11 installation media), C:Windows is probably D:Windows (your operating system) while C: is probably your system partition (the boot info). Entering diskpart and then list vol will display drive volumes so you know what’s what (type exit to close diskpart). To run the bcdboot operation from a recovery environment, you want something like this command: bcdboot D:Windows /s C:Footnote…
Master Boot Record – The first sector on the whole drive and contains a boot loader as well as information about partitions on the drive.
Volume Boot Record (aka Partition Boot Sector/System Partition in MS terminology) – The first sector on a partition containing information to load an operation system.
Still can’t boot into Windows? Experiencing blue screens or some other bug? The OS has built-in tools to scan for and replace corrupt system files:
A separate DISM command can scan the Windows component store for corrupt files and automatically repair them:
Files and folders can be encrypted or compressed and then unencrypted and decompressed with quick individual commands for each operation — make sure you change the target destination:
Encrypt a file or folder: cipher /e C:UsersTechSpotDesktopFolder (here are more cipher commands — /h applies a hidden attribute)
Decrypt that file or folder: cipher /d C:UsersTechSpotDesktopFolder
Compress a file or folder: compact /c /s:C:UsersTechSpotDesktopFolder
Decompress a file or folder: compact /u /s:C:UsersTechSpotDesktopFolder
You can create semi-incremental file backups using robocopy, though this is more involved than the previous commands.
There’s a great Super User thread discussing the subject where variants of the same command are recommended for having robocopy do basic file backups, copying files from one location to another — but only when changes have been made.
Here’s the most suggested command (see the link for an explanation on the options):
robocopy C:source M:destination /MIR /FFT /R:3 /W:10 /Z /NP /NDL
These reports are surprisingly detailed and may help in understanding issues involving your system’s power consumption or wireless connectivity.powercfg /energy (Generates a report about the energy efficiency of your system — the location of the report is mentioned after the command finishes)
powercfg /batteryreport (Generates a report with specifications for your battery as well as stats and graphs about the history of your battery usage)
netsh wlan show wlanreport (Generates a report with specs for your wireless hardware along with information about your connection history)
A variety of old school telnet services are still available, including the ability to watch Star Wars Episode IV.
Enter telnet towel.blinkenlights.nl into a Command Prompt for the movie to start (there’s no sound).
Note: If the command isn’t recognized, you might have to enable telnet. Search Start or the Control Panel for “Turn Windows features on or off” and check the box next to Telnet (click Ok…).More places you can go via telnet:Note: This feature was originally published on October 2018. We have revised some of its content and bumped it due to its old school nature, as part of our #ThrowbackThursday initiative.
TECHSPOT : Tech Enthusiasts, Power Users, Gamers
TechSpot is a registered trademark. About Us Ethics Statement Terms of Use Privacy Policy Change Ad Consent Advertise
© 2021 TechSpot, Inc. All Rights Reserved.

source