How to make Bootable USB Windows using Windows PowerShell

in utopian-io •  7 years ago  (edited)

What Will I Learn?

  • how to make Bootable USB Windows using Windows PowerShell

Requirements

  • Windows PowerShell (available in Windows OS)
  • Windows 10 or 8 ISO Image File
  • Flashdrive 8GB or Higher

Difficulty

  • Basic

What is Windows PowerShell?

Windows PowerShell, previously named with Micrososft Shell or PowerShell is a command line interface (abbreviated CLI) tool and a scripting language developed by Microsoft Corporatiom. This tool already exists directly in the Windows Operating system.

powershell.PNG

Before the bootable process, it would be nice to know in the folder where the Windows ISO file is located. Here we will use windows 10. So let's see and check where Windows 10 ISO file is located.

The ISO file to be processed for bootable is named en_win_10_pro_64bit. The file is stored in the directory F: \Software\Windows.

lokasi iso.PNG

Here we go for the next step.

1.Find Windows PowerShell through the Windows Search box and type in the keyword "windows powershell" so that Windows PowerShell will appear. Then open the run as Administrator.

wp.png

2.Then input the command below, where this command is to get all USB list connected to PC and then USB will be in format to FAT32. And then click Enter.

$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

proses pw.PNG

3. Afterwards , will appear a window that displays the USB list. Press the OK button.

jendela ps.PNG

4.Then the command will appear to format the flashdrive.

format.PNG

5. A pop up window appear for the disk formatting commands. Click Start and wait until the process is complete.

formatdisk.PNG

6.Then, mount the Windows ISO file to appear in the Exprorer file (main page). We can open it by double clicking on the ISO file (this way can only be used in Windows 8.1 and Windows 10) or use the command below. Make sure the bold is the directory where the Windows file is stored.

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

mount iso.png

7. Check in the page file exproler. The mount that we did earlier will appear.

hasil mount explorer.png

8.The next step is to create a bootable Windows that has been mounted and then copy it to Flashdrive media. Type the following commands one by one and wait for the process to complete.

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

proses copy.png

9. Finally, see what happened on your flashdrive. If successful, on your flashdrive there will be a copy of the ISO that has been mounted from the directory G (directory mount ISO before).

hasil akhir.PNG

Curriculum

This is the first tutorial i'm contributing using Windows PowerShell.



Posted on Utopian.io - Rewarding Open Source Contributors

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

thank you @shreyasgune

Hey @shreyasgune, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!

nice post my bro @simpleawesome i hope your success in the future.

thank you @devarizaldi

Hey @simpleawesome I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • This is your first accepted contribution here in Utopian. Welcome!

Suggestions

  • Contribute more often to get higher and higher rewards. I wish to see you often!
  • Work on your followers to increase the votes/rewards. I follow what humans do and my vote is mainly based on that. Good luck!

Get Noticed!

  • Did you know project owners can manually vote with their own voting power or by voting power delegated to their projects? Ask the project owner to review your contributions!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x