Install Windows 8 on a USB Stick

Prepare a USB Stick

To start from a USB Stick, it must be made bootable and formatted with ntfs. To do so, use diskpart as described in my other blog post here but use “format fs=ntfs quick” instead of fat32 filesystem.

Install Windows using ImageX

As you may now, Windows ISO Files / DVD-Roms contain an image file with the contents of the C:\ Partition. Now to install Windows 8 it’s only needed to unpack the filesystem to the USB Stick and create a Bootloader.

To make it easier, I’ve used the GUI Version of ImageX from In this Tool there’s a Tab called “Apply” where you can direct to the install.wim Image file and select the USB Stick as destination. By applying, GImageX extracts the filesystem to the Stick.

  1. Extract “install.wim” from the Windows 8 ISO file, Folder “sources” to a temporary location on your computer
  2. Use a tools like GImageX to Apply “install.wim” to the USB Stick
  3. Open CMD with elevated rights
  4. enter “bcdboot e:\windows /s e:”, where e:\ is your USB stick’s drive letter



Change multiple User’s Passwort with a randomly generated one

Import-Module ActiveDirectory
Add-Type -Assembly System.Web

$adpath = “AD:\DC=xantox,DC=madera,DC=ch”
$adfilter = “TestUser*”
$userlist = Get-ChildItem $adpath | ? {$_.Name -like $adfilter}
$table = @()

foreach ($user in $userlist) {

$item = “” | select Username, Password
$item.Username = $
$item.Password = [Web.Security.Membership]::GeneratePassword(20,4)

$securepw = $item.Password | ConvertTo-SecureString -AsPlainText -Force
Set-ADAccountPassword -Identity $user -NewPassword $securepw

$table += $item

$table | export-csv -path .\passwordlist.txt