Convert-WindowsImage is the new version of WIM2VHD designed specifically for Windows 10. It also works fine with Windows 8 and Windows 8.1. Completely rewritten in PowerShell, the Convert-WindowsImage command-line tool allows you to create generalized (“sysprepped”) VHD and VHDX images from any official build (ISO or WIM image) of Windows 7, Windows Server 2008 R2, Windows 8, Windows Server 2012, Windows 8.1 and Windows Server 2012 R2.

New in version 10 is support for Windows 10 (and Windows Server 2016) VMs and images. Full change log is below.
Images created by Convert-WindowsImage will boot directly to the Out Of Box Experience (OOBE), ready for your first-use customizations. So you can think of it as of replacement for your daddy's “Deploy-Sysprep-and-Capture” approach. 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!

Convert-WindowsImage (just like its precessor, WIM2VHD tool) was originally created by Mike Kolitz ( kolitz) while he was a Microsoft Employee and worked on Windows. The tool is now maintained and evolved by his friends from Microsoft Consulting Services (MCS).

Change Log

Version 10 (June 2015) Note: Multiple breaking changes!

Version 6.3 QFE 7 (February 17, 2014)

Version 6.3 QFE 6 (February 16, 2014)

Version 6.3 QFE 5

Version 6.3 for Windows 8.1 and Windows Server 2012 R2

Version 6.2 for Windows 8 and Windows Server 2012

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?

Use the function (New in version 10). Also highlights some of the new features.

# Load (aka "dot-source) the Function 
. .\Convert-WindowsImage.ps1 
# Prepare all the variables in advance (optional) 
$ConvertWindowsImageParam = @{  
    SourcePath          = "9600.17053.WINBLUE_REFRESH.141120-0031_X64FRE_SERVER_EN-US_VL-IR5_SSS_X64FREV_EN-US_DV9.ISO"  
    RemoteDesktopEnable = $True  
    Passthru            = $True  
    Edition    = @(  
    Package = @(  
# Produce the images 
$VHDx = Convert-WindowsImage @ConvertWindowsImageParam
Create a VHDX using GPT partition layout (for UEFI boot and Hyper-V Generation 2 VMs).
.\Convert-WindowsImage.ps1 -SourcePath "9477.0.FBL_PARTNER_OUT31.130803-0736_X64FRE_SERVER_EN-US-IRM_SSS_X64FRE_EN-US_DV5.ISO" -VHDFormat VHDX -Edition ServerDataCenterCore -VHDPartitionStyle GPT -Verbose
Create a VHDX using MBR (old school) partition layout (which is still the default). Prepare the VHDX for Native Boot on BIOS-based computer: skip BCD creation, disable VHDX expansion on Native Boot, enable Remote Desktop and add a custom driver.
.\Convert-WindowsImage.ps1 -SourcePath "9600.16384.WINBLUE_RTM.130821-1623_X64FRE_SERVER_EN-US-IRM_SSS_X64FRE_EN-US_DV5.ISO" -VHDFormat VHDX -Edition "ServerDataCenterCore" -SizeBytes 8GB -VHDPartitionStyle MBR -BCDinVHD NativeBoot -ExpandOnNativeBoot:$false -RemoteDesktopEnable -Driver "F:\Custom Driver" -Verbose
Show the graphical user interface. Note that this feature does not support all of the options that present in command-line interface:
.\Convert-WindowsImage.ps1 -ShowUI
Create a VHD using all default settings from D:\sources\install.wim.
.\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.
.\Convert-WindowsImage.ps1 -SourcePath D:\sources\install.wim -Edition Professional
Create a 60GB VHDX, using all default settings, from D:\Windows8RPx64.iso.
.\Convert-WindowsImage.ps1 -SourcePath D:\Windows8RPx64.iso -VHDFormat VHDX -SizeBytes 60GB
Create a 48TB VHDX from D:\WindowsRPx64.iso with a custom file name.
.\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.
.\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.
"D:\foo.wim" | .\Convert-WindowsImage.ps1 -Edition Professional -EnableDebugger Serial -ComPort 2 -BaudRate 19200