How to Create a Windows 11 USB Installer Using the Command Prompt

How To Create A Windows 11 Usb Installer Using The Command Prompt

There are multiple ways to install Windows 11, and one of the most convenient is to create a Windows 11 USB installer using Command Prompt. This method doesn’t require any additional software. Continue reading to learn how to get started creating the installer.

Tip: wondering what the difference is between Command Prompt and PowerShell? This guide explains the differences in depth.

Obtaining the Windows 11 ISO File

The first part of creating a bootable USB operating system installer is to get its ISO file. You’ll need about 5.2GB of free space for the download. Follow these steps to get the Windows 11 ISO file:

  1. Visit the Microsoft Support website.
Microsoft Windows 11 download page.
  1. Scroll down to the “Download Windows 11 Disk Image (ISO) for x64 devices” menu and select “Windows 11 (multi-edition ISO for x64 devices)” from the drop-down list. Click “Download” below.
Selecting your Windows 11 disk image (ISO) option.
  1. In the next screen, select your preferred language from the list.
Selecting the language to run Windows 11 in.
  1. Click “Confirm,” then select “64bit-Download” to start the download of the ISO file.
Clicking on "Confirm" button to start download

Good to know: keep data safe that’s stored on a flash drive. Learn how to encrypt or decrypt a USB device on Windows.

Creating the Windows 11 Bootable USB with Command Prompt

After downloading the ISO file, plug a USB flash drive into your computer and create a backup if you have important files on it, as it will be formatted. Proceed with the following steps:

  1. Click on the Start menu, type “Command Prompt,” right-click on the result, then select “Run as administrator.”
Typing "Command Prompt" in Windows Search.
  1. Open DiskPart by typing diskpart and pressing Enter:
Running "diskpart" in Command Prompt.
  1. To view the list of disks on your PC, type list disk and press Enter:
Usb Installer Type List Disk And Press Enter
  1. Select the designated USB disk by typing the following command:.
select disk [number of the disk]
  1. You can identify which disk is your USB flash drive by checking the “Size” column in your list of disks. For example, in the following screenshot, our 8GB USB drive is referred to as “Disk 2.”
Listing all disks on system using "list disk" command.
  1. To fully clean out the flash drive, type clean and press Enter:
Cleaning USB drive using "clean" command in Command Prompt.
  1. Create a primary partition by typing the following in Command Prompt:
create partition primary
Creating new partition on bootable USB drive using Command Prompt.
  1. To select the new partition, type select partition 1 and press Enter:
Selecting created partition on USB drive using Command Prompt.
  1. You’ll need to format your USB flash drive to make it bootable. Type this command and press Enter:
format FS=FAT32 quick
Formatting USB flash drive using Command Prompt.
  1. Set a letter for the USB drive. Make sure the letter you’re assigning is not already assigned to another drive. (For example, C is not acceptable, as it’s already assigned to the partition where your OS files are located.) In this example, we are assigning “B” as the USB drive’s name.
assign letter=B
Assigning new letter in USB drive in Command Prompt.
  1. Quit the DiskPart tool by typing exit and pressing Enter:
Exiting the DiskPart tool using Command Prompt.

Tip: avoid any inconveniences by learning how to fix an unformattable and unusable USB drive in Windows.

  1. To mount the Windows 11 ISO file, type the following and press Enter. The path to the Windows ISO file will depend on where it is located on your PC.
PowerShell Mount-DiskImage -ImagePath “Path to Windows ISO file”
Mounting Windows 11 ISO file in Command Prompt.
  1. Reopen DiskPart by typing diskpart and pressing Enter:
Opening DiskPart in Command Prompt.
  1. To view the list of volumes on your device, type list volume.
Listing volumes on device using "list volume" command.
  1. You can locate your mounted Windows 11 ISO file in the list by checking a volume’s format (in this case “UDF”), typing “(DVD-ROM),” label, or size. In this example, the mounted ISO is Volume 0, with the letter “E” assigned to it.
Volume view under DiskPart in Command Prompt.
  1. Exit DiskPart by typing exit and pressing Enter:
Exiting DiskPart via Command Prompt.
  1. Access the mounted Windows 11 ISO file by using the Windows ISO volume letter followed by a colon. In our case, we are typing E:.
Accessing the mounted Windows 11 ISO file in Command Prompt.
  1. Use cd boot in the boot folder and press Enter:
Executing the "cd boot" command in Command Prompt.
  1. To update the flash drive volume with BOOTMGR compatible bootcode, type the following and press Enter. Note that we are assigning “B” to the flash drive in this example, so replace it with your chosen letter. This command essentially makes the drive suitable to boot Windows 11, as the volume bootcode is responsible for loading the proper files that start the OS.
bootsect /nt60 B:
Adding BOOTMGR compatible bootcode to flash drive volume.
  1. To copy the Windows 11 Installation files to the USB drive, use the following command. Remember that “E” and “B” in this command are specific to this example and need to be replaced with your specific details.
xcopy E:\*.* B:\ /E /F /H
Copying Windows 11 installation files on USB drive.
  1. Wait for the copying process to complete.
Windows 11 files copied to USB drive.
  1. Your Windows 11 bootable USB drive is now ready. You can use this USB drive to install or reinstall Windows 11 on your computer. Just restart your system and boot via a USB drive.

Tip: need to check whether a USB drive is bootable in Windows? We show you how.

Frequently Asked Questions

Are there other ways to create a Windows 11 bootable USB flash drive?

If you feel intimidated by the Command Prompt and the numerous steps required to create a Windows 11 bootable USB drive with it, you may want to try using the lightweight, fast, and easy-to-use Rufus application.

What can I do if the Windows 11 USB installer isn't working?

There are many reasons why your Windows 11 USB installer is not working. It may be due to a faulty port or cable, a corrupted or damaged USB drive, an old USB device (USB 1.0 or 2.0), or incompatibility of the USB format (NTFS or FAT32) with boot mode (legacy BIOS or UEFI). To remedy the situation, try changing your USB device and port, checking the USB device format, and setting the USB device to your preferences for booting.

How can I make a bootable Windows 11 USB installer in Mac?

Creating a bootable Windows 11 USB installer on Mac is a bit different. It requires either using Boot Camp (a program for Intel-based Macs), Terminal on M1 Macs, or a third-party app like UUByte ISO Editor.

How can I make a bootable Windows 11 USB installer in Ubuntu?

If you’re an Ubuntu user, try using the Terminal or apps such as Ventoy or WoeUSB to create a bootable Windows 11 USB installer.

Image credit: Pexels. All screenshots by Farhad Pashaei.

Farhad Pashaei
Farhad Pashaei

As a technophile, Farhad has spent the last decade getting hands-on experience with a variety of electronic devices, including smartphones, laptops, accessories, wearables, printers, and so on. When he isn’t writing, you can bet he’s devouring information on products making their market foray, demonstrating his unquenchable thirst for technology.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox