Created
July 24, 2022 16:01
-
-
Save jamesWalker55/19f4cc80ce08aba3eff8966c4df6a6ba to your computer and use it in GitHub Desktop.
This is a powershell script that automatically adds then removes "en-US" from the keyboard input methods list.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script solves the issue in this stackoverflow question: | |
# https://superuser.com/questions/1092246/how-to-prevent-windows-10-from-automatically-adding-keyboard-layouts-i-e-us-ke | |
# This method adds the en-US layout then removes it, ensuring that the layout is always removed from the taskbar | |
# I don't have a high enough reputation so I can't post this there, so here is the script: | |
# define the language to be removed | |
$LanguageToRemove = "en-US" | |
# get the current language list | |
$LangList = Get-WinUserLanguageList | |
# add "en-US" to the list and save | |
$LangList.Add($LanguageToRemove) | |
Set-WinUserLanguageList $LangList | |
# remove "en-US" from the list and save | |
$USLangObj = $LangList | Where-Object LanguageTag -like $LanguageToRemove | |
$LangList.Remove($USLangObj) | |
Set-WinUserLanguageList $LangList |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment