How to create Windows 10 bootable USB with Command Prompt

While there are other tools, such as Rufus and the Media Creation utility, that can be used to generate a bootable USB to install Windows 10, you can also use the DiskPart command-line utility to make a flash drive to clean install Windows 10 from the Command Prompt.

The procedures for creating a USB bootable media to install Windows 10 using the Command Prompt are covered in this guide. Additionally, you must download the Windows 10 ISO file using these procedures and attach a USB flash drive with at least 8GB of space to your computer before continuing.

Create USB bootable media to install Windows 10

Use these procedures to make a USB flash drive that can be used to install Windows 10:

Launch Windows 10.

Look up “Command Prompt,” then right-click on the first result and choose “Run as Administrator.”

To launch DiskPart, use the following command and hit Enter:

To find the USB flash device, type the following command and hit Enter:

To choose the storage, type the following command and hit Enter:

To remove everything from the USB thumb drive, use the following commands and hit Enter:

dislpart clean USB flash drive

To create a primary partition, use the following command and hit Enter:

To choose the new partition, use the following command and hit Enter:

To activate the chosen partition, type the following command and hit Enter:

To enable the USB flash device to boot up, type the following command and hit Enter:

To set a drive letter and volume for the USB flash drive, use the following command and hit Enter:

Change X in the command to any letter that is accessible.

diskpart prepare USB flash drive

To exit the tool, type the following command and hit Enter:

To mount the ISO file, type the following command and hit Enter:

Windows 10 ISO mount command

Make sure to adjust the path in the command with the ISO file’s storage location.

To restart DiskPart, type the following command and hit Enter:

To find the drive letter for the mounted ISO file, type the following command and hit Enter:

diskpart check mounted ISO drive letter

To exit DiskPart, type the following command and hit Enter:

To open the Windows 10 ISO file, use the following command and hit Enter:

To reach the boot folder, type the following command and hit Enter:

To change the USB flash drive’s volume boot code, use the following command and hit Enter:

To copy every Windows 10 file to the USB flash drive, type the following command and hit Enter:

Create Windows 10 bootable USB flash drive

Replace the E and Xdrive letters in the command with the appropriate drive letters for the USB flash drive and the Windows 10 ISO image, respectively.

After completing the procedures, you can install Windows 10 on PCs via BIOS or UEFI using the bootable flash drive.

Leave a Comment