Author Posts

March 2, 2017 at 4:13 pm

Hi,

I am struggling with changing the keyboard layout in Windows 10 1607 using PowerShell.

The result I am looking for is shown in this image: https://ibin.co/3EBwRX02fLI2.png
I managed to set this configuration manually using the GUI. But now I would like to get the same result in an automated fashion 🙂

I want only one entry in the list and that should be English (United States) and the keyboard layout should be Swedish.

The code I have tried is this

$languageList = New-WinUserLanguageList en-US
$languageList[0].InputMethodTips.Clear()
$languageList[0].InputMethodTips.Add('041D:0000041D')
Set-WinUserLanguageList $languageList -Force

But this gives me the following result, https://ibin.co/3EBxrZottezj.png

It adds Swedish as a second entry in the list.

Not sure what else to try and would appreciate some assistance.

Regards Erik

March 2, 2017 at 5:28 pm

$languageList = New-WinUserLanguageList en-US
$languageList[0].InputMethodTips.Clear()
$languageList[0].InputMethodTips.Add('041D:0000041D')
#Set-WinUserLanguageList $languageList -Force
Set-WinUserLanguageList -LanguageList en-US

March 2, 2017 at 6:51 pm

Hi Kaustubh,

Thanks for reaching out!

Unfortunately that does not seem to work.

When I try those commands I end up with one language, English (United States), but the keyboard layout is US and not Swedish.

March 2, 2017 at 7:58 pm

$languageList = New-WinUserLanguageList en-US
$languageList[0].InputMethodTips.Clear()
Set-WinUserLanguageList sv-se -Force

This works for me.