A Windows tool for USB / SD / MMC sticks only. It lists removable disks, tells you if they are healthy, repairs them when it can, and formats them when you ask.
It will not touch the Windows system disk. Internal drives (NVMe, SATA, and friends) stay hidden unless you deliberately override that.
A safer stand-in for raw diskpart when you just need to:
- See what is plugged in
- Check whether a stick is dirty, locked, or empty
- Repair it so it is actually usable
- Wipe and format it (NTFS or exFAT)
- Eject it
There is a mouse-first GUI (double-click run.cmd) and a PowerShell CLI that share the same engine.
- Not TestDisk or any kind of data recovery
- Not a boot-record / MBR rebuild tool
- Not an in-place MBR ↔ GPT converter that keeps your files
- Not for RAID, dynamic disks, or imaging ISOs onto a stick
- Not a password tool for BitLocker (unlock in Windows first)
Back up anything you care about before you format or erase.
- Windows 10 or 11
- Administrator (the launchers will ask)
- Windows PowerShell 5.1 (built in) — PowerShell 7 on Windows is fine too
- No extra modules to install
- Clone this repo, or download the ZIP and unpack it.
- Double-click
run.cmd. - Allow Administrator.
- Plug in a USB stick if one is not already listed.
- Click the disk card, then Diagnose. A healthy formatted stick should say ready to use.
- To wipe it: Format disk... → pick NTFS or exFAT → Format disk → Confirm.
- Eject when you are done.
Format and Erase use Confirm / Cancel. The box names the disk (number, serial, size, bus) and lists what will run. Cancel aborts.
Recommended filesystem: exFAT if the stick is 32 GB or larger and you want Mac + PC; NTFS for Windows-only / backups.
run.cmd → ExternalDiskKit.Gui.ps1 (WPF window, mouse)
run-cli.cmd → ExternalDiskKit.ps1 (same engine, terminal)
| You click | What actually runs |
|---|---|
| Diagnose | Dirty-bit check, BitLocker status, write-protect clues. USB live scans are unreliable, so a snapshot error is not treated as “needs chkdsk”. If the volume is really dirty, an offline repair runs automatically. |
| Repair | Online the disk if needed, then Repair-Volume -OfflineScanAndFix (NTFS) or chkdsk /F /X. |
| Format | Optional Clear-Disk if partitions exist, then initialize/convert the table, New-Partition, Format-Volume, then an offline repair so the stick is ready to use. |
| Erase table | Clear-Disk -RemoveData -RemoveOEM — blank stick, no filesystem. |
| Eject | Asks Windows to eject, then offlines the disk. |
Safety checks on every write:
- Never the Windows system / boot / pagefile disk
- Removable bus only by default (
USB,SD,MMC,1394,FileBackedVirtual) - Identity is number + serial + size + name, not disk number alone
- BitLocker-locked volumes refuse format/erase until you unlock them in Windows
- Preview of the cmdlets before Confirm
Logs go to %TEMP%\ExternalDiskKit-yyyyMMdd-HHmmss.log.
Same rules, no window.
# From an elevated PowerShell
cd path\to\ExternalDiskKit
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
.\ExternalDiskKit.ps1 # list removable disks
.\ExternalDiskKit.ps1 -DiskNumber 2 -Diagnose
.\ExternalDiskKit.ps1 -DiskNumber 2 -Repair
.\ExternalDiskKit.ps1 -DiskNumber 2 -Initialize -CreatePartition -Format NTFS -Label BACKUP -WhatIf
.\ExternalDiskKit.ps1 -DiskNumber 2 -Initialize -CreatePartition -Format NTFS -Label BACKUP
.\ExternalDiskKit.ps1 -DiskNumber 2 -Clean # type DELETE to confirm
.\ExternalDiskKit.ps1 -SelfTest
Get-Help .\ExternalDiskKit.ps1 -FullOr double-click run-cli.cmd.
CLI wipe/format/clean asks you to type DELETE. -WhatIf prints the cmdlets and changes nothing. Empty inventory (no USB plugged in) exits 0.
| Exit | Meaning |
|---|---|
| 0 | OK |
| 2 | No matching disk |
| 3 | Safety refused |
| 4 | You aborted |
| 5 | A cmdlet failed |
Dangerous override (still never the OS disk): -AllowInternalDisks -Force and the full serial.
| File | Role |
|---|---|
run.cmd |
Elevate and open the GUI |
run-cli.cmd |
Elevate and open the CLI |
ExternalDiskKit.Gui.ps1 |
WPF UI |
ExternalDiskKit.ps1 |
Engine + CLI |
LICENSE |
MIT |
MIT. See LICENSE.
