Create Hyper-V VHD in Seconds With WAIK WIM2VHD.WSF

There are several ways to install a VM simple create and install OS. Or with SCVMM 2012 Winking smile 

But If you want to do it fast and you don’t like the Image thing witch I don’t like. then there is a solution. In under the 3 minutes I create a Fresh installed Windows 2008R2 SP1 Server for Hyper-V.

How ? with an unattend install Create an XML put in your stuff and you are ready to go.

But there is more, Choose the right tools there are multiple ways to do this. I show you how to use the WAIK tools. in the WAIK tools there is this little script WIM2VHD.WSF this can do magic for you.

First Install the WAIK 3.1 Version this is the latest version till now. Download the 3.0 WAIK and update it with the waik_supplement_en-us this will make the version 3.0 <> 3.1

The ISO can be downloaded from the following link:

Installation Instructions

The ISO does not contain instructions for installation.  More information on the update can be found at the following location:

To install the updated WINPE you copy the contents of the ISO over top of the following directory:

C:\Program Files\Windows AIK\Tools\PETools image

You should choose to overwrite the files.  It basically replaces all the WINPE specific files and Optional Components (OC’S). 

ConfigMgr and Microsoft Deployment Toolkit Information



C:\Program Files\Windows AIK\image

Now we start up the WIM2VHD.WSF

And using the Parameters :

where is your WIM file on the Source :


Source Files


What is your version


The VHD Name


And the unattend file used for installation




So with this I have a complete unatted install in just under de 2 min. Yes then the image is ready to use but the OS needs to setup.

With a little Powershell Script I create a auto VM create and startup. You can adjust this anyway you like. Just for testing.



Type the Virtual Machine’s name: TEST01
How much memory to assign? In MB: 4096
How many CPUs to assign? Integer Number: 4

Virtual Machine TEST01 has been successfully created
Start and Connect to  Type [Y]ES or [N]O: So with this I have a complete unatted install in just under de 2 min. Yes then the image is ready to use but the OS needs to setup.

This takes also about 5 Min depends on the unattend.xml if you do a lot of after config then it needs more time



Author: Robert Smit [MVP]

Robert Smit is Senior Technical Evangelist and is a current Microsoft MVP in Clustering as of 2009. Robert has over 20 years experience in IT with experience in the educational, health-care and finance industries. Robert’s past IT experience in the trenches of IT gives him the knowledge and insight that allows him to communicate effectively with IT professionals who are trying to address real concerns around business continuity, disaster recovery and regulatory compliance issues. Robert holds the following certifications: MCT - Microsoft Certified Trainer, MCTS - Windows Server Virtualization, MCSE, MCSA and MCPS. He is an active participant in the Microsoft newsgroup community and is currently focused on Hyper-V, Failover Clustering, SQL Server, Azure and all things related to Cloud Computing and Infrastructure Optimalization. Follow Robert on Twitter @ClusterMVP Or follow his blog Linkedin Profile Http:// Robert is also capable of transferring his knowledge to others which is a rare feature in the field of IT. He makes a point of not only solving issues but also of giving on the job training of his colleagues. A customer says " Robert has been a big influence on our technical staff and I have to come to know him as a brilliant specialist concerning Microsoft Products. He was Capable with his in-depth knowledge of Microsoft products to troubleshoot problems and develop our infrastructure to a higher level. I would certainly hire him again in the future. " Details of the Recommendation: "I have been coordinating with Robert implementing a very complex system. Although he was primarily a Microsoft infrastructure specialist; he was able to understand and debug .Net based complext Windows applications and websites. His input to improve performance of applications proved very helpful for the success of our project

2 thoughts on “Create Hyper-V VHD in Seconds With WAIK WIM2VHD.WSF”

  1. Wow nice post!

    I have a few questions..
    1) Can you please post the power shell script?
    2) How I can use the xml file to insert to the domain with sysprep?
    3) The sccm have a hole procedure after the deployment of the win how can I do the same with the vhd?
    4) How I can automatic run commands after the sysprep

    Thanks in advance

  2. all the tools are free on the internet. the WAIK holds the scripts. download waik and intall the kit and you will haven the scripts.
    the win2vhd is only for creating the vhd.

    Sccm is a different way to deploy a OS and can do much more than the wim2vhd but you can create a unattended xml with run once commands in it.

    see the deployment forums on teched to get more info about this.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: