Back to Blog

Fixing Windows Language Settings That Revert After Sysprep in AVD

Solve the common issue where Windows regional settings revert to US defaults after sysprep in Azure Virtual Desktop gold images using unattend.xml configuration.

Jacob Williams
6 min read
Azure Virtual Desktop
Windows
Sysprep
Gold Images
Regional Settings

This is one of the most common issues I see admins run into when building AVD gold images - you carefully set your regional settings to United Kingdom, run sysprep, capture the image, deploy new session hosts... and they come up with US settings every single time. It's frustrating, and it affects date formats, keyboard layouts, and regional preferences for your users.

The Problem

The issue is that sysprep generalises regional settings back to defaults as part of its cleanup process. Without explicit instructions, Windows defaults to US settings during deployment. A lot of admins assume that setting the language on the gold image will stick through sysprep, but it doesn't work that way.

The Solution: Unattend.xml

The fix is to use an unattend.xml file that tells Windows what regional settings to apply during deployment. Here's how to implement it:

Step 1: Create Your Unattend.xml

Create an unattend.xml file with the following structure. This example sets everything to UK English:

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="specialize">
        <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
            <InputLocale>en-GB</InputLocale>
            <SystemLocale>en-GB</SystemLocale>
            <UILanguage>en-GB</UILanguage>
            <UserLocale>en-GB</UserLocale>
        </component>
    </settings>
    <settings pass="oobeSystem">
        <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
            <InputLocale>en-GB</InputLocale>
            <SystemLocale>en-GB</SystemLocale>
            <UILanguage>en-GB</UILanguage>
            <UserLocale>en-GB</UserLocale>
        </component>
        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
            <TimeZone>GMT Standard Time</TimeZone>
        </component>
    </settings>
</unattend>

Step 2: Place It On Your Gold Image

Before running sysprep on your gold image, copy the unattend.xml file to:

C:\Windows\Panther\unattend.xml

This is one of the locations Windows automatically checks during setup.

Step 3: Run Sysprep

Run sysprep as normal:

sysprep /oobe /generalize /shutdown

When you use the /oobe flag, sysprep will look for and use the unattend.xml file during the next boot.

Step 4: Capture and Deploy

Capture your image as usual. When you deploy new session hosts from this image, Windows will apply the settings from the unattend.xml during the specialize configuration pass, before the machine is fully deployed.

Testing

Deploy a single test session host first to make sure the settings stick. Log in and check:

  • Regional format in Settings
  • Keyboard layout
  • Date/time format
  • Any language-specific settings your users need

Alternative Approaches

If the unattend.xml approach doesn't work for your environment, there are other options:

Post-deployment Scripts

Use Intune, group policy, or custom script extensions to set regional settings after deployment. Less elegant but gives you flexibility.

Remove US Language Pack

If UK settings still won't stick, you might need to fully remove the US language pack from the image using DISM before sysprep.

DISM Offline Servicing

Mount your captured image and inject language packs using DISM after sysprep has run but before deployment.

Why This Happens

Sysprep's job is to generalise an image for deployment across multiple machines. Part of that process involves stripping out machine-specific and user-specific settings, including regional preferences. Language packs and experience packages often get removed entirely. The unattend.xml essentially says "after you've generalised everything, apply these specific settings during deployment."

Additional Notes

If you need to deploy multiple language packs (not just UK English), you'll need to make sure the language pack CAB files or AppX packages are available during deployment - either staged on the image, available from a network location, or specified in the unattend.xml to be downloaded.

For Azure Virtual Desktop specifically, consider whether you need these settings at the system level or just for user profiles. Sometimes it makes more sense to configure language preferences through FSLogix profile settings or Intune user policies rather than baking them into the image.


Have you run into similar issues with AVD gold images? What approaches have worked in your environment?