Create Windows 10 Bootable USB Stick With PowerShell

Windows is one of the most used operating systems which was launched by Microsoft back in 1985. The latest version of Windows is 10/11 which is mostly used all over the world. In some scenarios, the users may face problems related to their windows like their windows may get corrupted, may get affected by malware, or become slow and choppy.

In such cases, the best method to fix this issue is a fresh installation of the windows in your system for which you will need a bootable pendrive. A Bootable Pendrive is a disk that is used to boot up a system for the installation of Windows. In today’s article, we will learn how to create a bootable USB device through Windows Powershell / command line interface(cmd).

Before deep diving into the methods to create a bootable USB device let us understand what is a bootable drive and why do we need a bootable USB drive to install Windows/Linux.

What is the need to create a bootable USB?

A bootable USB drive is a USB drive that contains all the necessary files to boot a computer. Following are the cases when a bootable USB drive is needed:

  • To install a new operating system on your device.
  • To recover from a system failure
  • To create a portable version of your operating system.
  • To run a diagnostic tool on a computer that is not booting properly.

Now that we understand the need for a bootable USB drive, let’s review the methods for creating one.

Method 1: Create a bootable USB drive using CMD.

To create a bootable USB drive for Windows installation you will require the setup of the latest version of Windows. The setup can be downloaded from the official Microsoft site in the form of an iso file then you will have to mount it to access its content. To know more about mounting iso files refer to this article –>

Step 1: Download the latest version of Windows.

1. Go to your browser and type download windows and the version of Windows required.

2. Click on the first official link that appears.

3. Scroll down a little and click on Download Windows 11 Disk Image (ISO).

4. Select the edition of the windows and click on download now.

5. Select the product language and click on confirm.

6. Click on 64-bit download and your Windows download will be started immediately.

Step 2: Create the bootable USB drive

1. To create the bootable USB drive go to Windows Start and type cmd and click on run as administrator to open command prompt.

2. Type diskpart and press enter. Diskpart is a Windows feature which allows users to manage disks, partitions, and volumes.

3. Type list disk and press enter.

4. Type select disk 1 and press enter.

5. Now again type list disk and press enter. Now the selected disk will be your USB drive.

6. Type clean and press enter. This will format your USB drive and will make it ready for Windows installation.

7. Now type the following command and press enter

create partition primary

8. Now select partition 1 and press enter.

9. Now type the following command to make the USB bootable and press enter

format fs=ntfs quick

10. In the output if you see diskpart successfully formatted the volume then you can ensure that your USB drive is ready.

11. Now we will have to copy the content of Windows setup from the iso file to the sub drive.

12. Right-click on the iso file and mount it.

13. Copy all the contents of the iso file.

14. Paste all the files inside the USB drive.

15. When the transfer of the files is complete your bootable USB drive will be ready for Windows installation.

Method 2: Create a bootable USB drive using Windows Powershell.

1. Step 1 would be the same as the previous method we would need the ISO file of the latest version of Windows. So you can follow the same steps mentioned in the above method to download the ISO file and once it is downloaded move to the next step.

2. Right-click on the start button and open Windows Powershell in admin mode.

3. Paste the following command in the PowerShell and press enter to format your USB drive.

$Results = Get-Disk |
Where-Object BusType -eq USB |
Out-GridView -Title 'Select USB Drive to Format' -OutputMode Single |
Clear-Disk -RemoveData -RemoveOEM -Confirm:$false -PassThru |
New-Partition -UseMaximumSize -IsActive -AssignDriveLetter |
Format-Volume -FileSystem FAT32

you will see the following command after pressing enter, be patient until your USB drive is formatted.

4. An interface will open to select the USB drive, make sure you have plugged in the right USB drive that you want to boot, select the required USB drive, and then click on OK.

5. Then paste the following command in the PowerShell and press Enter.

$Volumes = (Get-Volume).Where({$_.DriveLetter}).DriveLetter
Mount-DiskImage -ImagePath C:\ISO\Windows.ISO
$ISO = (Compare-Object -ReferenceObject $Volumes -DifferenceObject (Get-Volume).Where({$_.DriveLetter}).DriveLetter).InputObject

You can modify the ImagePath if you want as per your need.

Note: Before pressing Enter make sure you have mentioned the right path for your ISO file. As in my case the ISO file was placed in my C drive in a folder named ISO, you can also do the same or else you can modify the command a little bit as per your file path. You can modify the second line of the above command after ImagePath to add your own file path if you want

6. Now paste the following command in the PowerShell and press enter

Set-Location -Path "$($ISO):\boot"
bootsect.exe /nt60 "$($Results.DriveLetter):"
Copy-Item -Path "$($ISO):\*" -Destination "$($Results.DriveLetter):" -Recurse -Verbose

7. Wait a little bit once the command is executed successfully you will see the following screen. If in the bottom left of the PowerShell, you can see the boot command it means your USB drive has been booted successfully.

8. Open your USB drive, and you will be able to see the following files, this means that your USB Bootable drive is ready.

9. Now you can eject your USB drive and use it to install Windows/Linux in your system.

Once you have followed all the steps mentioned above, your bootable USB drive will be ready to use. You can simply use it to install Windows/ Linux on your system, run diagnostic tools, or recover from a system failure. So it is recommended to always keep a bootable drive ready to avoid any kind of system failures or consequences.

We hope that the methods and solutions We’ve suggested in this article will help you to create a bootable USB drive for your Windows/Linux installation. Stay connected, stay informed, and enjoy your online journey!

Also Read

FAQ’s on creating a bootable USB device

1. What is a bootable USB device?

It is basically a portable device which contains an operating system and all the necessary files required to start or repair a computer in any case of failures.

2. How can I format the USB drive completely before making it bootable ?

You can format the USB or use the diskpart command in CMD or powershell . To do so follow the methods mentioned above in the article .

3. What are the minimum basic requirements for creating a bootable USB drive?

You need an USB drive or a CD- drive with atleast 8GB of storage and the ISO file of the operating system you want to install.

4. What safety measures should I take before creating a bootable USB drive?

Ensure that you have made a back up of any important data of the USB drive that you are going to make bootable .