Create a VMware vSphere template for Windows Server 2019

The following README will guide you on how to create a Windows Server 2019 VMware vSphere virtual machine template.

Prerequisites

Note: This guide assumes that you have some VMware vSphere familiarity and you have knowledge on how to install Windows Server. It is also does not designed to go over either VMware and/or Windows best-practices.

  • Download the latest Windows Server ISO file

  • VMware vSphere 6.5 and above

  • Although it can be used locally, for faster deployment, it is recommended to upload the file to a vSphere datastore or to vCenter Content Library.

Creating Windows Server 2019 VM Template

Deploying & Installing Windows Server

  • Deploy new virtual machine

    Create new VMware vSphere VM

    Create new VMware vSphere VM

    Create new VMware vSphere VM

    Create new VMware vSphere VM

    Create new VMware vSphere VM

    Create new VMware vSphere VM

  • Make sure to select Microsoft Windows Server 2016 or later (64-bit) as the Guest OS.

    Windows Server Guest OS

  • Point to the Windows Server ISO file location.

    Create new VMware vSphere VM

    Create new VMware vSphere VM

  • Power-on the VM and start the Windows Server installation.

    Power-on the VM

    Windows Server installation

    Windows Server installation

    Windows Server installation

    Windows Server installation

    Windows Server installation

    Windows Server installation

Post-installation

Before converting the VM to a template, few actions needs to be taken.

  • Install VMware Tools & Restart

    Install VMware Tools

    Install VMware Tools

    Install VMware Tools

    Install VMware Tools

    Install VMware Tools

    Install VMware Tools

    Install VMware Tools

    Install VMware Tools

    Install VMware Tools

  • Perform Windows Updates

  • Change PowerShell Execution Policy to “bypass” by running the Set-ExecutionPolicy -ExecutionPolicy Bypass command in PowerShell (can be later tuned on via Group Policy or a PowerShell script).

  • Allow WinRM communication to the OS buy running the allow_winrm PowerShell script.

  • None of the below are mandatory but should be considered for a Windows Template:

    • Disabling User Account Control (can be later tuned on via Group Policy or a PowerShell script)

    • Turn off Windows Defender FW (can be later tuned on via Group Policy or a PowerShell script)

    • Disabling Internet Explorer Enhanced Security Configuration (ESC) (can be later tuned on via Group Policy or a PowerShell script)

    • Enable Remote Desktop

    • In PowerShell, install Chocolaty

      Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
      
    • Install all baseline apps you may want to include in your template.

Convert to Template

Reduce the VM CPU count & memory resources to the minimum and convert the VM to template, switch the CD/DVD drive to client device as well disconnect it and convert the VM to template.

Reduce the VM CPU count & Memory

Convert the VM to template