6 Clever Ways to Use the Windows Command Prompt

select disk 3

… where, obviously, you replace the number 3 with whatever number corresponds to the disk in question. Finally, run:

clean

Your system will wipe the drive clean, with no hidden partitions or tables confusing your PC. Then you can click the Start menu, search for Disk Management, and right-click the drive to initialize and format it. Note that this merely wipes the partition tables, it doesn’t securely erase all your data—some of it may still be accessible with file recovery tools. To securely erase all traces (like if you’re going to recycle the drive or sell the PC), you’ll want to right-click the drive in Windows Explorer, choose Format, and uncheck the Quick Format box. Or use a third-party tool like DBAN, which has a number of other secure-erase options.

Get a List of Every Program Installed on Your PC

When you get a new laptop or do a clean reinstall of Windows, you’re likely to forget some of the tools you use every day and take for granted. Before wiping your drive, you can grab a list of every program installed on your PC with one command.

Unlike the others on this list, however, this command must be run from PowerShell, a newer, more powerful tool built into Windows. Open the Start menu, search for PowerShell, and launch a new window. Then run the following command—it’s long, but it’s just one copy-and-paste command, which’ll grab the contents of three different registry keys and output them to a text file on your desktop:

Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*, HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*, HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, Size, InstallDate | Format-Table -AutoSize > C:\Users\Whitson\Desktop\ProgramsList.txt

Replace Whitson with the name of your user folder at the end of that command to get the file on your desktop. Note that this won’t include Windows Store apps, though, which you can list by running:

Get-AppxPackage > C:\Users\Whitson\Desktop\StoreProgramsList.txt

Again, replacing Whitson with the name of your user folder. There’ll be a lot of junk in that list, but you can manually grab the few programs you want to remember and paste them into your original list, if it’s easier.

Watch Star Wars (No, Seriously)

OK, this isn’t exactly a “useful” trick, but it certainly is neat. If you enable Telnet in Windows (search for “turn windows features on or off” in the Start menu, then check the Telnet box), you can run:

telnet towel.blinkenlights.nl

To watch an ASCII version of Star Wars in your command prompt window. This has been around for years, and it still impresses me.


More Great WIRED Stories

Source

Author: showrunner