Modify keyboard layout

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 :slight_smile:

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

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

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.

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

This works for me.