Remove language from windows 10 using powershell

I want to use Powershell to add or remove a language and change the keyboard layout from left to right or right to left in Windows 10. I wrote code to add a language, but I can’t find a guide to delete it again or to change the layout. I also want to ask the user if he wants to add or remove a language.

This is my code.

$List = Get-WinUserLanguageList
$List.Add("lt-LT")
Set-WinUserLanguageList $List

Thank you in advance

+4
source share
1 answer

I succeeded using the English index in the array $Listin combination with the cmdlet Set-WinUserLanguageList. It seemed strange to me that I could not just flip the steps using the method $list.remove("lt-LT"), since it returns False, so I decided to recreate the list in a different way.

, "lt-LT", , , :

$list = Get-WinUserLanguageList

. $list[0]

LanguageTag     : en-US
Autonym         : English (United States)
EnglishName     : English
LocalizedName   : English (United States)
ScriptName      : Latin script
InputMethodTips : {0409:00000409}
Spellchecking   : True
Handwriting     : False

$list[1]

LanguageTag     : lt
Autonym         : lietuvių
EnglishName     : Lithuanian
LocalizedName   : Lithuanian
ScriptName      : Latin script
InputMethodTips : {0427:00010427}
Spellchecking   : True
Handwriting     : False

, , Set-WinUserLanguageList . , .

Set-WinUserLanguageList $($list[0])

Get-WinUserLanguageList

+1

Source: https://habr.com/ru/post/1689978/


All Articles