**  The cutest w10 lab setup  **

On occasion of the final release of Windows 10 I thought aber the fastest unattended way to deploy a #w10 VM. 

As a result I found this procedure consisting of 3 simple steps:

Step 1: Install Hyper-V 
The script below (Step 3) expects a Gen2 capable Hyper-V Host, which is Windows Server 2012 R2 or Windows 8.1

Step 2: Provide the ISO file
I downloaded "en_windows_10_multiple_editions_x64_dvd_6846432.iso" from MSDN and copied it to "c:\iso2vhd". The script
will also work with different ISOs, e.g. those who were created with the "Media Creation Tool". You should modify the 
file path variables in the script, if you use other names. 

Step 3: Open PowerShell, run the script
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/thorstenbutz/Get-DemoFile/master/w10_iso2vhd.ps1'))
This is meant to be one single line. Login with "Pa$$w0rd". Done.

What's happening there? '
The script downloads another script: “Convert-WindowsImage” from Technet Gallery. You can create a VHDX file from an ISO file with 
the help of this script. It's lightning fast and  you don not have to answer any dialogue to get started with Gen2 VMs.

But there is more: we put "unattend.xml" file into the VHDX to answer any setup related questions, we enable the built-in Administrator account and run a few First-Logon-Commands, which is primarily meant for demo and customizing purposes. You are invited to put your needs there. The "unattend.xml"
only consists of two phases: 4 and 7. The file will be automatically downloaded and copied to c:\iso2vhd. 

Of course, you don't need  to use "Invoke-Expression" (alias iex). Download it and run it locally.

A final tip: the VHDX files you create can easily be used as base images. You will save plenty of space. I did not put this into the script to keep it as simple as possible. 

Happy deploying,
Cheers W10!

- The ISO2VHD script:

- “Media Creation Tool”: 

- Convert-WindowsImage (automatically downloaded):

- Unattend.xml (automatically downloaded):
Shared publicly