Search
Twitter
Subscribe
Monday
Aug132012

Convert-WindowsImage.ps1 -ShowUI

I have used WIM2VHD.wsf in the past, and now that I'm spending more time in Hyper-V (both in Windows 8 Release Preview, and in Server 2012 Release Candidate), this Convert-WindowsImage.ps1 PowerShell script provides a nicely improved workflow for quickly creating new VHD (or VHDX) files.

Here's an example of how you can use it in a GUI mode. In this example, I pointed the source to the Windows Server 2012 RC ISO that I downloaded, and created a new dynamic 40GB VHDX from the Standard edition within that ISO.

PS E:\scripts> .\Convert-WindowsImage.ps1 -ShowUI

Note: the current directory where the script is launched from will be the path where the new VHD or VHDX will be created.

Windows(R) Image to Virtual Hard Disk Converter for Windows(R) 8
Copyright (C) Microsoft Corporation.  All rights reserved.
Version 6.2.8424.0.amd64fre.fbl_core1_hyp_dev(mikekol).120517-1616 Release Preview
INFO   : Launching UI...

 

INFO   : Opening ISO 8400.0.WINMAIN_WIN8RC.120518-1423_X64FRE_SERVER_EN-US-HRC_SSS_X64FRE_EN-US_DV5.ISO...
INFO   : Looking for H:\sources\install.wim...
INFO   : Scanning WIM metadata...
INFO   : Selected Working Directory is E:\Virtual Machines\Hyper-V Disks...
INFO   : Image 2 selected (ServerStandard)...
INFO   : Creating sparse disk...
INFO   : Attaching VHDX...
INFO   : Disk initialized...
INFO   : Disk partitioned...
INFO   : Volume formatted...
INFO   : Access path (I:\) has been assigned...
INFO   : Applying image to VHDX.  This could take a while...
INFO   : Signing disk...
INFO   : Image applied.  Making image bootable...
INFO   : Opening I:\boot\bcd for configuration...
INFO   : BCD configuration complete. Moving on...
INFO   : Drive is bootable.  Cleaning up...
INFO   : Closing VHDX...
INFO   : Closing Windows image...
INFO   : Done.

 

And now I have a new "Server2012RCstd.vhdx" that I can attach to a new virtual machine and boot!

 

PrintView Printer Friendly Version

EmailEmail Article to Friend

« I’ve registered for the 2012 Bike MS Ride | Main | The Happiness Advantage »

References (4)

References allow you to track sources for this article, as well as articles that were written in response to this article.

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>