Search This Blog

Saturday, January 4, 2014

Create a Generation 2 Sysprep VM using Convert-WindowsImage.ps1

 

With the latest update of Convert-WindowsImage.ps1 to version 6.3, it is now supported to create a sysprep virtual disk for the following operating system:-

  • Windows 8
  • Windows 8.1
  • Windows Server 2012
  • Windows Server 2012 R2

image

.\Convert-WindowsImage.ps1 –showUI

By using the UI, you only create a Generation 1 Virtual Disk. To create generation 2 virtual disk, execute the following command

.\Convert-WindowsImage.ps1 –SourcePath “C:\VM\Library\”en_windows_server_2012_r2_x64_dvd_2707946.iso” –vhdformat vhdx –Edition ServerStandard –VHDPartitionStyle GPT -Verbose

image

Note:-

  • SourcePath – the location of the ISO
  • VHDFormat – VHD or VHDX
  • Edition – ServerStandardCore, ServerStandard, ServerDataCenterCore, ServerDataCenter
  • VHDPartitionStyle – GPT or MBR

To test the script, please download from here