Search This Blog

Saturday, February 27, 2016

Create Windows Server 2016 Base Image Using Convert-WindowsImage

We are trying to create a base image running Windows Server 2016 TP4. Tested download Convert-WindowsImage.ps1 from https://gallery.technet.microsoft.com/scriptcenter/Convert-WindowsImageps1-0fe23a8f

However encountered an error message "Convert-WindowsImage only supports Windows 7 and Windows 8 Wim files"


which prevents us from proceed further.

[Resolution]

Then we get Convert-WindowsImage.ps1 from Windows Server 2016 TP4 iso files. Mount the iso and copy Convert-Windows.ps1 from NanoServer folder. It consists of 3954 code of line only.

Execute below command to create a base image with the following details:
  • Windows Server Standard Edition
  • 60GB size
  • Dynamic Disk
  • VHDX
  • VHD Partition Style -MBR

Convert-WindowsImage -SourcePath F:\iso\en_windows_server_2016_technical_preview_4_x64_dvd_7258292.iso -VHDFormat VHDX -Edition ServerStandard -VHDType Dynamic -SizeBytes 60GB -VHDPartitionStyle MBR -Verbose