** 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
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.
- The ISO2VHD script:https://github.com/thorstenbutz/Get-DemoFile/blob/master/w10_iso2vhd.ps1
- “Media Creation Tool”: http://go.microsoft.com/fwlink/p/?LinkId=616447
- Convert-WindowsImage (automatically downloaded):https://gallery.technet.microsoft.com/scriptcenter/Convert-WindowsImageps1-0fe23a8f
- Unattend.xml (automatically downloaded):http://www.thorsten-butz.de/public/w10oobe1_unattend.xml