Create with PowerShell a ISO for a Windows server 2016 unattended installation including VMware Tools and PVSCI drivers.
This post is the first one of “deploy a VMware lab automatically” serie.
The first goal was to skip the manuel steps associated to:
Create the first VM
Install VMware tools
Deploy from template
And replace them by:
Create with PowerShell an ISO for Windows server 2016 unattended installation including VMware tools.
Use PowerCLI to configure the VM.
Use PowerCLI to configure the OS with invoke-vmscript via the VMware tools.
Note: The script could also be used for others version of Windows.
1) Workstation with Windows 10
SSD strongly recommended for a fast execution
Enough disk space
2) Windows ADK installed in the default installation path. (Deployment Tools only)
Use the one associated to your Windows 10 build
#Find your build (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ReleaseId).ReleaseId
3) Download Windows ISO.
Example with windows server 2016 evaluation:
4) Identify the URL of the VMware tools ISO matching the version to be installed in Windows.
Index of all VMware tools
For example the URL for 6.5 now is:
5) Create “autounattend.xml” for this Windows server version.
The autounattend.xml must be configured to launch the installation of VMware tools.
See details in the next section
Create the autounattend.xml
The “autounattend.xml” is mandatory to automatically install Windows.
In this context it doesn’t need to be complex.
As long as VMware tools are installed, everything else could be configured with PowerCLI and PowerShell instead.
Download one below:
I have unticked “Hide Sensitive Data” in Windows System Image Manager>Tools.
So, the password is in clear text in the XML file and can be modified.
Build it yourself:
This post provides the majority of settings needed: Windows Server 2012 Unattended Installation
Few minor modifications:
For windows 2012R2 only
Image name: Windows Server 2012 R2 SERVERSTANDARD
Partition 1 size: 350 (Default size with 2012 R2)
For windows 2016 only
Image name: Windows Server 2016 SERVERSTANDARD
Partition 1 size: 500 (Default size with 2016)
And for both:
The most important setting, add in the “RunSynchronous” command in the specialize pass.
Path: D:\CustomFolder\setup64.exe /s /v”/qn REBOOT=R”
Script to create custom ISO
Reference to others blog post
This script is based on the work of many others bloggers.
Inject VMware Drivers into Windows Server 2012 ISO Image
Windows Server 2012 Unattended Installation
Update an ISO using PowerShell
Silent Install of VMware Tools From The Command Line
Manual Download of VMware Tools from VMware Website