To make a bootable Windows 10 USB drive with Command Prompt, use diskpart to wipe and format the USB drive, then copy the contents of a Windows 10 ISO onto it. It takes about ten commands and a file copy. You need a USB drive of at least 8 GB and a Windows 10 ISO file downloaded from Microsoft.
Warning: the clean command erases the selected disk completely. Choosing the wrong disk number can wipe your internal drive, so double-check the size before you continue.
Windows 10 reached end of support on October 14, 2025. Consumer Extended Security Updates (ESU) now run until October 12, 2027. If you’re installing fresh, consider whether the PC can run Windows 11 instead.
Quick Answer
Admin Command Prompt > diskpart > list disk > select disk N > clean > create partition primary > format fs=fat32 quick > active > assign > exit, then copy the ISO’s files to the drive.
Step 1: Prepare the USB Drive
- Plug in the USB drive and back up anything on it.
- Search Start for cmd, right-click Command Prompt, and choose Run as administrator.
- Type diskpart and press Enter.
- Type list disk. Find the USB drive by its size.
- Type select disk N, replacing N with the USB drive’s number.
- Type clean.
- Type create partition primary.
- Type format fs=fat32 quick.
- Type active (needed for older BIOS-based PCs).
- Type assign to give it a drive letter, then exit.

Step 2: Copy the Windows Files
- In File Explorer, right-click the ISO and choose Mount. It appears as a new DVD drive letter.
- Copy everything from the mounted drive to the USB drive. From Command Prompt: xcopy D:\*.* E:\ /e /h /f (D: is the mounted ISO, E: is the USB drive).
- If the copy fails on sources\install.wim because it’s larger than 4 GB, see the next section.
Handle an install.wim Larger Than 4 GB
FAT32 can’t store files over 4 GB. Copy everything except install.wim, then split it onto the USB drive:
dism /Split-Image /ImageFile:D:\sources\install.wim /SWMFile:E:\sources\install.swm /FileSize:3800
Windows Setup reads the split .swm files automatically.
Which Method Should You Use?
| Method | Best for |
|---|---|
| Microsoft’s Media Creation Tool | Easiest; downloads and builds the drive for you |
| diskpart + copy (this guide) | No extra software, or the tool won’t run |
| A third-party USB writer | Special cases such as other operating systems |
For the Windows 11 version, see how to put Windows 11 on USB.
To check the copied files, open the USB drive in File Explorer.
After reinstalling, learn how to control automatic updates.
Using a Lenovo? See how to boot a Lenovo laptop from USB.
For several installers on one drive, try Ventoy.
Troubleshooting
- The PC won’t boot from the USB drive: Open the boot menu (often F12, F11, Esc or F8 at startup) and pick the USB drive. Some PCs need USB boot enabled in firmware settings.
- Older BIOS PCs ignore the drive: Running bootsect /nt60 E: from the ISO’s boot folder may help write legacy boot code.
- “Access denied” in diskpart: Command Prompt isn’t running as administrator.
- clean fails: Close anything using the drive, or try another USB port.
Frequently Asked Questions
Why FAT32 and not NTFS?
UEFI firmware can boot FAT32 USB drives directly, and most can’t boot NTFS without extra help.
Do I need a product key to make the USB?
No. The key is only asked for during or after installation, and many PCs activate automatically with a digital license.
Will this erase my USB drive?
Yes. Everything on the selected disk is deleted.
Summary
- Run diskpart as admin and select the USB disk carefully.
- Clean, partition, format FAT32, mark active and assign.
- Mount the ISO and copy its files.
- Split install.wim if it’s over 4 GB.

Kermit Matthews is a freelance writer based in Philadelphia, Pennsylvania with more than a decade of experience writing technology guides. He has a Bachelor’s and Master’s degree in Computer Science and has spent much of his professional career in IT management.
He specializes in writing content about iPhones, Android devices, Microsoft Office, and many other popular applications and devices.