Search
StarWind is a hyperconverged (HCI) vendor with focus on Enterprise ROBO, SMB & Edge

Windows Server 2025 Unattend.xml Answer File Creation

  • December 17, 2024
  • 26 min read
Cloud and Virtualization Architect. Brandon has over 20 years of experience across multiple sectors. He is responsible for the creative and technical content direction at virtualizationhowto.com
Cloud and Virtualization Architect. Brandon has over 20 years of experience across multiple sectors. He is responsible for the creative and technical content direction at virtualizationhowto.com

If there is one thing that can make a difference in today’s fast paced IT environment’s, its automation. When building Windows templates for rolling out into production, Windows has an automated tool that can used for automation using an answer file to provide answers to input requests that admins are asked as Windows is installed. Now that Windows Server 2025 has been released as GA, let’s look at how to create an unattend.xml answer file to run an automated build of Microsoft’s latest server version.

Tools you will need

There are a few tools you will need for building the automated answer file for installing Windows Server 2025. First of all, you will need to download the Windows Server 2025 ISO image. You can get access to this at the Microsoft evaluations center evaluations here: Microsoft Evaluation Center.

After you download the Windows Server 2025 ISO, you will need a tool called the Windows Assessment and Deployment Kit or WADK for short.

You can download that here: Download and install the Windows ADK | Microsoft Learn. The May 2024 release of WADK added support for Windows Server 2025.

Installing WADK

The process to install WADK is straightforward and is basically a “next, next, finish” type process. However, below are the options that I checked as I was running through the install. Below is only a screenshot of one of the screens of the install, showing the options that I selected to be able to work with and create a Windows Server 2025 answer file.

Installing Windows Assessment and Deployment Kit to work with Windows Server 2025

Installing Windows Assessment and Deployment Kit to work with Windows Server 2025

Launching Windows System Image Manager

Now that we have the Windows Assessment and Deployment Kit (WADK) installed, we can use the installed tools to easily create an answer file. The tool that we want to launch after installing the WADK is Windows System Image Manager. It will look like the below. It has multiple panes you can work with depending on what type of file you have opened or created, etc.

Launching the Windows System Image Manager

Launching the Windows System Image Manager

 

What is the value of this utility? It allows you to be able to have a GUI tool to build out your answer file for your Windows Server 2025 build. And, not just Windows Server 2025, Windows 10, Windows 11, and other Windows Server operating systems.

Using the Windows System Image Manager, you don’t have to know the XML syntax to build out the answer file. You select the objects you want to add for automation to your answer file in the utility and it writes the underlying XML syntax needed.

Mount the Windows Server 2025 ISO and copy files locally

Now that we have the Windows System Image Manager launched, we need to mount the Windows Server 2025 ISO that was downloaded earlier. Once you have mounted the ISO, we need to copy the contents of the ISO image to a local folder on your computer. Why? This is so we can have a read/write copy of the files as we will need this to create the catalog needed with Windows System Image Manager.

After copying the contents of the Windows Server 2025 ISO image to a local folder. The file we are interested in is the install.wim file located in the sources folder of the image files copied from the ISO.

Viewing the install.wim file in the local folder copied from the ISO image

Viewing the install.wim file in the local folder copied from the ISO image

Open the file in Windows System Image Manager and catalog

Now that we have the files copied, we need to open the install.wim file in the Windows System Image Manager utility. You can open the Windows Image using the menu:

File > Select Windows Image

Open the install.wim file from your folder in Windows System Image Manager

Open the install.wim file from your folder in Windows System Image Manager

 

The first thing the Windows System Image Manager will want to do is create a catalog of the image file.

Creating a catalog of the Windows Server 2025 install.wim file

Creating a catalog of the Windows Server 2025 install.wim file

Common sections and configurations for your Windows Server 2025 answer file

There are many many configurations we can add to the answer file for our Windows Server 2025 build. However, there are a few core settings and configurations that many like to add to an automated build of a Windows Server or client operating system. Let’s take a look at a few of these settings, where these are added, and in which stage they are added as well.

Common configurations found in the answer file:

  • Language configuration
  • Disk configuration
  • Image configuration
  • Product key installation
  • Firewall configuration
  • Autologon
  • Scripts to run

Let’s see how each of these look in Windows System Image Manager.

Language configuration

As you know, when you install Windows, you will be prompted to configure the language for the operating system and keyboard layout. Using the language configuration in the answer file, we can add these settings to the answer file.

To add the language configuration, just add the amd64_Microsoft-Windows-International-Core-WinPE_neutral component to the 1 windowsPE section.

Setting the language configuration with the answer file

Setting the language configuration with the answer file

Disk configuration

One of the other configuration parameters we can configure is the disk configuration. In other words, how will the setup carve up and format your disk where you will be installing Windows. You can also fully configure EFI with the answer file.

In the 1 windowsPE section, add the amd64_Microsoft-Windows-International-Core-WinPE_neutral component and then add the DiskConfiguration. You can right-click the CreatePartitions and add partitions you want to create to the configuration.

Configuring disk partitioning and configuration in the Windows Server 2025 answer file

Configuring disk partitioning and configuration in the Windows Server 2025 answer file

Image configuration

In the image configuration, you tell the installer which image you want to install for Windows Server 2025. IN other words, you can here set whether you are installing Windows Server Core or Windows Server with the Desktop Experience. You can also configure the installer to install Standard or Datacenter.

You will find this configuration under the amd64_Microsoft-Windows-International-Core-WinPE_neutral component with the configuration ImageInstall > OSImage > InstallFrom. You can get the image names from the first screen that you see when you point to the install.wim, but for ease of use, you can use these:

  • Windows Server 2025 SERVERSTANDARDCORE
  • Windows Server 2025 SERVERSTANDARD
  • Windows Server 2025 SERVERDATACENTERCORE
  • Windows Server 2025 SERVERDATACENTER

You can also use the friendly names that you see in the Windows setup screen, like you see below:

Setting the ImageInstall image name for Windows Server 2025

Setting the ImageInstall image name for Windows Server 2025

Product key installation

Installing the product key is a great way to automate this configuration requirement in your automated Windows Server 2025 build templates. Under the same amd64_Microsoft-Windows-International-Core-WinPE_neutral component, you will see the UserData > ProductKey component, where you can enter the key. The key below is a generic KMS key from Microsoft, which you can find here: Key Management Services (KMS) client activation and product keys for Windows Server and Windows.

Configuring the Windows product key in the configuration of the answer file

Configuring the Windows product key in the configuration of the answer file

Firewall configuration

Another Windows component you may want to configure is the Windows firewall. Using the answer file, we can do that by adding rules out of the installation. Below, we are adding the Remote Desktop group and setting the firewall profile under which it will be active. This is found under the 4 specialize pass with the amd64_Networking-MPSSVC-Svc_neutral component.

Adding firewall allowances out of the Windows Server 2025 installation

Adding firewall allowances out of the Windows Server 2025 installation

Autologon

Most will want to use the Autologon configuration to automatically login to Windows and run various configurations and scripts, etc. To activate the autologon configuration, you can do that under the configuration pass 7 oobeSystem and the component wow64_Microsoft-Windows-Shell-Setup_neutral > AutoLogon and then set the password under the Password component.

Configuring Autologon in the Windows Server 2025 answer file

Configuring Autologon in the Windows Server 2025 answer file

Scripts to run

To go along with the thought of running scripts, you can easily add custom scripts for additional configuration and automation using the answer file. In the 7 oobeSystem pass and the wow64_Microsoft-Windows-Shell-Setup_neutral component > FirstLogonCommands > SynchronousCommand. Here you can set the order of the command and which command you want to run.

Configuring synchronous commands to run in Windows Server 2025 automated installation configuration

Configuring synchronous commands to run in Windows Server 2025 automated installation configuration

Sample answer file for Windows Server 2025 automated installation

Below is a sample answer file configuration for Windows Server 2025 that can be used with tools like Hashicorp Packer. You can check out how to run a Windows Server 2025 build with Packer here. The answer file below:

  • Sets the language
  • Configures the partitions
  • Installs the product key
  • Enables RDP and sets firewall allowances for RDP
  • Sets autologon
  • Runs a setup script to provision Windows updates and other configuration such as WinRM

Wrapping up

The process to create a Windows Server 2025 answer file for automated installations of Windows Server 2025 is straightforward thanks to the Windows System Image Manager utility as part of the Windows Assessment and Deployment Kit. Hopefully the examples and explanations given will help ones to get started with Windows Server 2025 automation.

Found Brandon’s article helpful? Looking for a reliable, high-performance, and cost-effective shared storage solution for your production cluster?
Dmytro Malynka
Dmytro Malynka StarWind Virtual SAN Product Manager
We’ve got you covered! StarWind Virtual SAN (VSAN) is specifically designed to provide highly-available shared storage for Hyper-V, vSphere, and KVM clusters. With StarWind VSAN, simplicity is key: utilize the local disks of your hypervisor hosts and create shared HA storage for your VMs. Interested in learning more? Book a short StarWind VSAN demo now and see it in action!