How to change the Windows 11 language with Intune

We are working with Windows machines that are delivered with an English-installed operating system, no matter if the machine is handed over to a user in The Netherlands, Spain or whatever country. But we want to provide our users with an easy way to completely change the machine in another language of their own choice. This means we want to provide an automated manner of changing the language of the machine. Because we want to make changing the language as easy as possible, but also because installing a language pack requires administrative permissions.

Last week I wrote an article to change the language of a device by installing a language pack during Autopilot enrollment. But another option is to allow the user to choose the language of their device after enrollment To provide the end user the option to change the language of the device themselves in an easy way.

For Windows 10 Oliver Kieselbach created an awesome PowerShell script to get the job done, which he describes in this blog post. This script installs the needed language pack to the device and sets the language as the default language, including the logon screen for example. The script uses a temporary scheduled task, to also set the language for the sign-in user.
The script can be wrapped as a win32 app and made available with Microsoft Intune to be installed by the end user via the Company Portal app.

I took my initial script to install a language during Autopilot enrollment and I took a part of Oliver his script to change the language settings of the signed-in user. The two scripts combined completely change the language settings of an existing Windows 11 (22H2) device.

New PowerShell command in Windows 11 22H2

As also described in my previous article Microsoft made it much easier to install an additional language pack in Windows 11 22H2. Microsoft introduced a PowerShell command: Install-Language.

By running this command, the language pack is installed, including the needed Feature on Demand (FOD) items. In the past, installing a language pack including the FODs required a lot more lines of scripting to get this done with PowerShell.

This example is from a Windows 11 22H2 machine, installed with an English OS after which I installed the Dutch language (nl-NL) by running just one command. As you can see the language features are installed for the Dutch language.

An existing script, with additional steps changes

I used the script which I created to install a language pack during the Autopilot enrollment and added a part of Oliver his script. The part of Oliver his script creates a user configuration PowerShell script, which configures the language settings under the user who is signed it. But this script needs to run under the user, therefore a temporary scheduled task is created and triggered under the signed-in user.

If we look at the script, we see not much is needed to install the language pack and assign the new language as the system preferred UI language. We only need these two commands:
Install-Language $language -CopyToSettings
Set-SystemPreferredUILanguage $language

As you can see I use the CopyToSettings parameter. If specified, this parameter sets the System and Default Device Settings (Windows Display Language, regional, and locale formats) to the installed language following the installation as described by Microsoft.

Although we use the CopyToSettings parameter with the install command, not all parts of the system are changed to the new language. In Windows 11 we have a new PowerShell command available; Copy-UserInternationalSettingsToSystem. This command Copies the current user’s international settings (Windows Display language, Input language, Regional Format/locale, and Location/GeoID) to the Welcome screen, system, and new user accounts as described in the docs. This changes the last pieces of the system to the new language.

But before we can do that, we first need to configure the new language for the account (system) under which the script is running, because the international settings are copied from the current user to the system.
That is done for several parts of Windows with the below commands.

After setting the language defaults, this is copied to the system.

The next part of the script creates the temporary scheduled task (comes from the script of Oliver), which is triggered and runs under the current logged-on user.

And this is the section that creates the PowerShell user config script which is run under the logged-on user and configures the language settings for the user.

If you want some more in-depth info on this part of the script I recommend reading Oliver his blog post.

The script I put together can be found on my GitHub repo.

Deploy the script with Microsoft Intune

The PowerShell script can be deployed as an available application to our end users via Microsoft Intune. The application can be installed when the users want to change the language of their Windows 11 device. This allows the users to change their device to the language of their own choice, but this requires you as an admin to make an app available per language.

As described the script can be deployed using Microsoft Intune as a win32 app. This allows us to set the app to force a mandatory reboot after installing the app, as a reboot is needed to change the language in all places on the device.

Make sure the Device restart behavior is set to Intune will force a mandatory device restart in your app deployment.

I advise you to set the Restart grace period on the assignment of the app. In case you don’t set the restart grace period in combination with a mandatory forced reboot, the end user device will restart immediately after the app finished installing.

Set the restart grace period and snooze duration on the assignment to your needs.

The script adds a registry key when the script is successfully run. The key can be used for Intune detection. We can use a detection script or a detection rule like below.

End-user experience

Let’s have a look at the user experience when a user kicks off this script by installing the app via the Company Portal.

Before installing the app, the Windows settings are shown in English. The Windows Display language is English as found on the Language & Region tab in settings.

Of course, the start menu is in English.

Different language packs are made available to our users as applications in the Company Portal app.

As soon as the app is installed an Intune Management extension notification is shown. The notification informs the user a reboot is required and the deadline for this.

And soon after that, another notification is shown with a grace period and snooze option (it’s in Dutch as I installed the Dutch language app as an end-user).

After the reboot, the logon screen is shown in Dutch.

The Windows display language is changed to Nederlands (Dutch) even as the Country or region which is set as the Netherlands (Nederland).

As soon as the store apps are updated the store apps are shown in the new language like the other apps in the start menu.

And the store itself is shown in the new language.

There is one item to show which is not completely changed directly in the new language after installing the language, but a part of Windows Spotlight on the lock screen still shows in English, although the rest of the screen shows in Dutch. It is also seen on Windows 10. It most of the time changes to the new language when you answer the question on the lock screen If you like what you see with the Not a fan as an answer. Otherwise, it changes after some time without doing anything.
It is confirmed by a support case with Microsoft this is by design.

If you see the Microsoft store apps not changing their language, please verify if you have set the policy setting Require Private Store Only. The device version of this setting shouldn’t be used as this blocks automatically updating store apps, instead use the user version of the setting.

That’s all for this post and script.
Again, the script is found on my GitHub. Let me know if you make any improvements/ changes to the script for your usage in the comments below.

Note; if you are going to test the script in Hyper-V, turn off enhanced view.

9 Comments

  1. Hi Peter,
    Thanks for sharing the script.
    I would like to make a solution for my company where we can change between multiple language packs. If needed move to Swedish, then to Norwegian and to Danish, then back to Swedish.
    When I try to create different packages the script works first time, but not the next.
    I have only changed the language and geoId variables in the script.
    Do you have a solution to this?

    • Hi Morten,
      Delete the registry key that was added by the already installed language pack. So the ideea is to clean the registry key of the other “possible language packs” that you have in Intune using this method. Add the reg delete command for all the language packs you have in the list except the one you are installing. For example if you are installing the en-gb language, add reg delete command at the end of the script for the other language packs you have in the list :
      REG delete “HKLM\Software\$CompanyName\LanguageXPWIN11\v1.0” /v “SetLanguage-en-us” /f
      REG delete “HKLM\Software\$CompanyName\LanguageXPWIN11\v1.0” /v “SetLanguage-es-es” /f
      REG delete “HKLM\Software\$CompanyName\LanguageXPWIN11\v1.0” /v “SetLanguage-es-us” /f

      Do that for all the language pack scripts. The idea is to delete the registry keys for all the language packs you have available in intune except the one you are installing and in this way, every time you are installing a language pack, the others are shown as available because the script deleted all the keys for the other packs.

  2. Hi Peter.

    Is there anyway to change the language with this script with out touching the keyboard and regional settins?

    • Hi Kristoffer,

      See if it fits your needs if you remove the part where geoid is used and Set-WinUserLanguageList. I’m not sure what the end-result if of doing that.

Leave a Reply

Your email address will not be published.


*