WINDOW 11

How to Create Autounattend.xml for Windows 11

2 SOLUTIONS
OCTOBER 22, 2024

An autounattend.xml file automates Windows 11 installations, eliminating manual setup and ensuring the same settings across all deployments. It’s a must-have for IT admins handling large-scale installs, system integrators, and developers who need consistent test environments.

Deepak Yadav
Deepak Yadav

Expert, Head of Windows Circle

Windows 11 Installation Media

Ensure you have a bootable USB drive or ISO file of Windows 11.

Windows System Image Manager

This is part of the Windows Assessment and Deployment Kit (ADK), which you will use to create and edit the autounattend.xml.

Administrative Privileges

Ensure you have admin access to the PC on which you will create and use the autounattend.xml file.

Using Windows System Image Manager (WSIM)

6 STEPS EASY 2 MIN

1/2

METHOD
Method 1
Overview

Windows System Image Manager (WSIM) is a tool from Windows ADK used to create automated Windows installation files (autounattend.xml). The process involves six key steps as provided below.

Method 1 of 2
Next Method

Install Windows ADK

Download the Windows ADK from Microsoft and include Deployment Tools during installation. This provides WSIM for creating the autounattend.xml file.

Method 1 of 2
Step 1 of 6

Mount Windows 11 ISO

Right-click the Windows 11 ISO and select Mount. In WSIM, go to File > Select Windows Image and browse for the install.wim file in the sources folder of the mounted ISO.

Method 1 of 2
Step 2 of 6

Create a New Answer File

In WSIM, select File > New Answer File. Add components like Disk Configuration, User Accounts, and Regional Settings from the Windows Image pane by right-clicking and selecting Add to Answer File.

Method 1 of 2
Step 3 of 6

Configure Disk Partitioning

Go to Disk Configuration and define how Windows will partition the disk. Be careful, as incorrect settings can erase data.

Method 1 of 2
Step 4 of 6

Set Up Critical Settings

Under Microsoft-Windows-Shell-Setup, configure the computer name, user accounts, time zone, and language settings.

Method 1 of 2
Step 5 of 6

Validate and Save

Validate your answer file by selecting Tools > Validate Answer File. Save it as autounattend.xml. to your USB drive.

Info: Always validate your file using Tools > Validate Answer File.

Method 1 of 2
Step 6 of 6

Creating Using PowerShell

4 STEPS EASY 2 MIN

2/2

METHOD
Method 2
Overview

To create an autounattend.xml file using PowerShell, open PowerShell as an admin, generate the file with New-ProvisioningPackage, customize it with settings using Add-ProvisioningPackageSetting, and save it. This can be done quickly in four steps.

Method 2 of 2

Open PowerShell

Launch PowerShell as an administrator. Right-click the Start button and select Windows Terminal (Admin).

Method 2 of 2
Step 1 of 4

Generate the Answer File

In PowerShell, run the following command to create a new autounattend.xml file: New-ProvisioningPackage -Path .\autounattend.xml

Method 2 of 2
Step 2 of 4

Customize Settings

You can customize the file by using cmdlets like Add-ProvisioningPackageSetting. For example, to configure network settings:

Add-ProvisioningPackageSetting -Path .\autounattend.xml -Component "Microsoft-Windows-Network" -Setting "Ethernet" -Value @{IPAddress="192.168.1.100";SubnetMask="255.255.255.0"}

Method 2 of 2
Step 3 of 4

Save the File

After configuring the necessary settings, save the answer file in the path you specified. Double-check the contents to ensure it’s been generated correctly.

Method 2 of 2
Step 4 of 4

Additional Tips

Image

Test in a Virtual Machine: Before using the autounattend.xml file on actual hardware, always test it in a virtual machine like Hyper-V to avoid errors during deployment.

Encrypt Sensitive Data: Never include plain text passwords in your autounattend.xml file. Use encryption to keep your deployment secure.

Include Post-Installation Scripts: You can automate post-install tasks by adding custom scripts (PowerShell, CMD) to the file for things like software installs or additional configuration steps.

Methods (2)

Using Windows Syste...
6 Steps
Creating Using Powe...
4 Steps