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.

Windows 11 USB from Command Prompt
Windows 11 USB from Command Prompt / Image: Mauro Huculak

UPDATED 3/5/2025: You can use Command Prompt with the DiskPart tool to create a Windows 11 USB bootable media, and in this guide, I’ll outline the steps to complete the process.

On Windows 11, you can create a USB bootable media with several tools, including the Media Creation Tool and popular third-party tools like Rufus and Ventoy. However, you can also use Command Prompt to create a USB to boot a computer to install Windows 11.

Similar to using third-party tools, you will need a USB bootable media with at least 8GB.

In this guide, I’ll teach you 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 Windows 11 bootable USB with Command Prompt

To create a Windows 11 USB flash drive, use these steps:

  1. Open the Microsoft Support website.

    Quick note: If you already have the ISO file, you can skip to step 7.
  2. Select the Windows 11 option under the “Download Windows 11 Disk Image (ISO) for x64 devices” section.

    Windows 11 ISO download

  3. Click the Download button.

  4. Select the installation language.

    Select ISO file language

  5. Click the Confirm button.

  6. Click the 64-bit Download button to save the Windows 11 ISO file on the computer.

    Windows 11 x64 ISO download

  7. Open Start

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

  9. Type the following command to open Diskpart and press Enter:

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

    list disk
  11. 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 flash drive you want to use.
  12. Type the following commands to delete everything from the USB flash drive and press Enter:

    clean

    DiskPart clean USB

  13. Type the following command to create a primary partition and press Enter:

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

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

    format FS=NTFS quick
  16. 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

    Change X for any available letter you want to use in the command.

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

    exit
  18. 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

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

  19. Type the following command to relaunch Diskpart and press Enter:

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

    list volume
  21. Type the following command to exit Diskpart and press Enter:

    exit
  22. Type the following command to access the ISO file and press Enter:

    E:
  23. Type the following command to open the “boot” folder and press Enter

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

    bootsect /nt60 X:
  25. Type the following command to open the root of the mounted drive and press Enter:

    cd..
  26. Type the following command to copy all the Windows 11 2024 Update installation files to the USB flash drive and press Enter:

    xcopy E:*.* X: /E /F /H

    Create Windows 11 USB

    In the command, change the “E” and “X” letters with the correct drive letters for the ISO image file and the USB flash drive, respectively.

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

Update March 5, 2025: This guide has been updated to ensure accuracy and reflect changes to the process.

About the author

Mauro Huculak is a Windows How-To Expert and founder of (est. 2010). With over 21 years as a technology writer and IT Specialist, Mauro specializes in Windows, software, and cross-platform systems such as Linux, Android, and macOS.

Certifications: Microsoft Certified Solutions Associate (MCSA), Cisco Certified Network Professional (CCNP), VMware Certified Professional (VCP), and CompTIA A+ and Network+.

Mauro is a recognized Microsoft MVP and has also been a long-time contributor to Windows Central.

You can follow him on YouTube, Threads, BlueSky, X (Twitter), LinkedIn and About.me. Email him at [email protected].