How to create bootable Windows 11 USB with Command Prompt

If you want to install Windows 11, you will need a USB bootable media, and you can create one using Command Prompt with these instructions.

Create Windows 11 USB with Cmd
Create Windows 11 USB with Cmd

On Windows 11 (or Windows 10), you can create a USB bootable media with several tools, including Media Creation Tool and the popular open-source Rufus. However, you can also use Command Prompt with the DiskPart tool to create a USB to boot a computer to install Windows 11 and start taking advantage of all the new features.

In this guide, you will learn the steps to create a USB flash drive to boot a computer to install Windows 11. You can also use these instructions on Windows 10.

Create a bootable USB to install Windows 11 with Command Prompt

To create a USB flash drive to install Windows 11 with Command Prompt, download the ISO file, and use these steps:

  1. Open Start.

  2. Search for Command Prompt, right-click the top result, and select the Run as Administrator option.

  3. Type the following command to open DiskPart and press Enter:

    diskpart
  4. Type the following command to determine the USB flash drive and press Enter:

    list disk
  5. Type the following command to select the storage and press Enter:

    select disk 1
    Quick tip: The select disk 1 command as an example, but you have to replace 1 with the number of the flash drive you want to use.
  6. Type the following commands to delete everything from the USB flash drive and press Enter:

    clean

    DiskPart clean USB
    DiskPart clean USB
  7. Type the following command to create a primary partition and press Enter:

    create partition primary
  8. Type the following command to select the new partition and press Enter:

    select partition 1
  9. Type the following command to make the USB flash drive bootable and press Enter:

    format FS=FAT32 quick
  10. Type the following command to assign a volume and a drive letter for the USB flash drive and press Enter:

    assign letter=X
    Create UEFI bootable USB
    Create UEFI bootable USB

    In the command, change X for any available letter you want to use.

  11. Type the following command to quit the tool and press Enter:

    exit
  12. Type the following command to mount the Windows 11 ISO file and press Enter:

    PowerShell Mount-DiskImage -ImagePath "C:\path\to\Windows11.iso"
    PowerShell mount ISO command
    PowerShell mount ISO command

    In the command, update the path with the location where you have stored the Windows 11 ISO file.

  13. Type the following command to relaunch DiskPart and press Enter:

    diskpart
  14. Type the following command to determine the drive letter for the mounted Windows 11 ISO file and press Enter:

    list volume
  15. Type the following command to exit DiskPart and press Enter:

    exit
  16. Type the following command to access the Windows 11 ISO file and press Enter:

    E:
  17. Type the following command to the boot folder and press Enter

    cd boot
  18. Type the following command to update the volume boot code for the USB flash drive and press Enter:

    bootsect /nt60 X:
  19. Type the following command to copy all the Windows 11 installation files to the USB flash drive and press Enter:

    xcopy E:\*.* X:\ /E /F /H
    Create Windows 11 USB
    Create Windows 11 USB

    In the command, change the E and X drive letters with the correct drive letters for the Windows 11 ISO image and the USB flash drive, respectively.

Once you complete the steps, you can use the flash drive to start the computer to perform a fresh install of Windows 11.

About the author

Mauro Huculak is a Windows How-To Expert who started Pureinfotech in 2010 as an independent online publication. He has also been a Windows Central contributor for nearly a decade. Mauro has over 14 years of experience writing comprehensive guides and creating professional videos about Windows and software, including Android and Linux. Before becoming a technology writer, he was an IT administrator for seven years. In total, Mauro has over 20 years of combined experience in technology. Throughout his career, he achieved different professional certifications from Microsoft (MSCA), Cisco (CCNP), VMware (VCP), and CompTIA (A+ and Network+), and he has been recognized as a Microsoft MVP for many years. You can follow him on X (Twitter), YouTube, LinkedIn and About.me. Email him at [email protected].