Description 

Convert-WindowsImage is the new version of WIM2VHD designed specifically for Windows 8. Completely rewritten in PowerShell, the Convert-WindowsImage command-line tool allows you to create sysprepped VHD and VHDX images from any official build of Windows 7, Windows Server 2008 R2, Windows 8, and Windows Server 8. 
 
Images created by Convert-WindowsImage will boot directly to the Out Of Box Experience, ready for your first-use customizations. You can also use these images for automation by supplying your own unattend.xml file, making the possibilities limitless. Fresh squeezed, organically grown, free-range VHDs - just like Mom used to make - that work with Virtual PC (Windows 7 only), Virtual Server (Windows 7 only), Microsoft Hyper-V, or Windows' Native VHD-Boot functionality!
 

What's new in WIM2VHD for Windows 8?

System Requirements

Are there any changes from the way WIM2VHD worked?

Yes.  Here's a list of WIM2VHD features that have not been implemented in Convert-WindowsImage.ps1. 
* These features may be implemented in a later release.

Are there any known issues?

In the initial release of Convert-WindowsImage.ps1, there was a bug which prevented the creation of Hyper-V Server VHD and VHDX files.  This bug has since been fixed in the .1 revision which was released on 6/12/2012.  If you are not affected by this issue, there is no need for you to upgrade to the current release.

There are currently no known issues with this build of Convert-WindowsImage.ps1.

How do I use this thing?

 Show the graphical user interface:
PowerShell
Edit|Remove
.\Convert-WindowsImage.ps1 -ShowUI
Create a VHD using all default settings from D:\sources\install.wim.
PowerShell
Edit|Remove
.\Convert-WindowsImage.ps1 -SourcePath D:\sources\install.wim 
 
# Since no edition is being specified, the command will succeed if there is only one image in the specified WIM file.  If there are multiple images, the command will fail and it will list the possible editions.
Create a VHD using all default settings from D:\sources\install.wim while specifying an edition.
PowerShell
Edit|Remove
.\Convert-WindowsImage.ps1 -SourcePath D:\sources\install.wim -Edition Professional
Create a 60GB VHDX, using all default settings, from D:\Windows8RPx64.iso.
PowerShell
Edit|Remove
.\Convert-WindowsImage.ps1 -SourcePath D:\Windows8RPx64.iso -VHDFormat VHDX -SizeBytes 60GB
Create a 48TB VHDX from D:\WindowsRPx64.iso with a custom file name.
PowerShell
Edit|Remove
.\Convert-WindowsImage.ps1 -SourcePath D:\Windows8RPx64.iso -VHDFormat VHDX -SizeBytes 48TB -VHDPath .\MyCustomName.vhdx
Use WIM2VHD-style argument names to create a 20GB fixed VHDX with a custom name and an unattend file from D:\foo.wim, and return the path to the created VHDX on the pipeline.
PowerShell
Edit|Remove
.\Convert-WindowsImage.ps1 -WIM D:\foo.wim -Size 20GB -DiskType Fixed -VHDFormat VHDX -Unattend D:\myUnattend.xml -VHD D:\scratch\foo.vhdx -passthru
Enable serial debugging in the VHD, using COM2 at 19200bps.
PowerShell
Edit|Remove
"D:\foo.wim" | .\Convert-WindowsImage.ps1 -Edition Professional -EnableDebugger Serial -ComPort 2 -BaudRate 19200