When your Windows computer refuses to boot, panic usually sets in.
But before you wipe the hard drive or throw in the towel, the Windows-command line has a powerful set of tools built specifically for emergency rescue, partition management, and file system repair.
Best of all?
You can access all of them even if your operating system completely fails to load, simply by booting from a Windows installation USB or recovery media.
The Emergency Windows Toolkit
Here are four essential commands you can use to diagnose, fix, and rescue a broken system:
1. Diskpart (Disk Partition Tool)
- What it does: A comprehensive, interactive disk and partition management tool built right into Windows.
- Rescue Use: If your partition table is broken, or if you need to inspect attached drives, clean a corrupt volume, or reassign drive letters when your recovery environment mixes them up,
diskpartgives you total low-level control over your storage.
Quick Overview of How Diskpart Works:
- How to open it: Open Command Prompt or PowerShell, type
diskpart, and hit Enter. This opens a dedicatedDISKPART>command prompt. - Common commands:
list disk(shows all connected drives)select disk X(chooses a specific drive to work on)clean(wipes the partition table)create partition primary(makes a new partition)format fs=ntfs quick(formats the partition)
- Modern alternative: Windows also features advanced storage cmdlets in PowerShell (like
Get-DiskandFormat-Volume), butDiskpartremains the classic, built-in terminal tool for emergency environments.
2. Chkdsk (Check Disk — The Windows fsck)
- What it does: Scans your file system for structural errors, bad sectors, and inode/file table corruption, and automatically repairs them. It is the direct Windows equivalent of Linux’s
fsck. - Rescue Use: If a corrupted file system is crashing your PC or preventing Windows from booting, running
chkdsk C: /f /rfrom a recovery prompt can find and repair damaged system files.
3. Fsutil (File System Utility)
- What it does: Performs advanced, granular tasks on FAT, exFAT, and NTFS file systems (such as managing dirty bits, checking free space, or managing repair flags).
- Rescue Use: A common lifesaver in recovery is checking the “dirty bit” (
fsutil dirty query C:). If Windows flags a volume as “dirty” due to an unclean shutdown or hard crash, this tool helps you verify disk health so you know whether a fullchkdskfix is required.
4. Mkdir (Make Directory)
- What it does: Creates a new directory or folder.
- Rescue Use: Sounds simple, right? But when you are rescuing data from an unbootable PC using a command prompt, you often need to create temporary staging folders (
mkdir C:\BackupData) to organize and copy critical files safely to an external flash drive before attempting risky repairs or reinstalls.
How to Access These Tools When Your PC Won’t Boot
If your computer is stuck in a boot loop or shows a “Blue Screen of Death” (BSOD) before reaching the desktop, follow these steps to access your command-line rescue suite:
- Boot from Media: Insert a Windows Installation USB or CD/DVD and turn on your PC (press F12, F11, or Del during startup to open your boot selection menu).
- Open Command Prompt:
- On the Windows Setup screen, click Next, then click Repair your computer in the bottom-left corner.
- Go to Troubleshoot > Advanced options > Command Prompt.
- (Pro tip: On almost any Windows Setup screen, you can press Shift + F10 to instantly launch a Command Prompt window).
- Run Your Rescue Commands:
- Use
diskpartto inspect drive assignments (list volumeorlist disk). - Use
chkdsk C: /fto fix partition errors on your system drive. - Use
mkdirand file transfer commands (copy/xcopy) to save essential data to an external drive.
- Use
Conclusion
Next time a Windows machine refuses to start, don’t rush straight to a clean reinstall.
Keeping tools like Diskpart, Chkdsk, Fsutil, and Mkdir in your mental toolkit
alongside a bootable Windows USB—turns a terrifying crash into a manageable repair task.
How to open it: Open Command Prompt or PowerShell, type diskpart, and hit Enter.
This opens a dedicated DISKPART> command prompt.
Common commands:
list disk(shows all connected drives)select disk X(chooses a specific drive to work on)clean(wipes the partition table)create partition primary(makes a new partition)format fs=ntfs quick(formats the partition)
Modern alternative: Windows also features advanced storage cmdlets in PowerShell (like Get-Disk and Format-Volume), but Diskpart remains the classic, built-in terminal tool.



Geef een reactie