0

I am trying to manage the preferred languages in my Microsoft Edge browser on Windows using PowerShell. Specifically, I want to remove certain languages that appear in the "edge://settings/languages" settings (e.g., Dutch).

enter image description here

To do this, I need to know which registry keys or paths in HKLM and/or HKCU I can target for removal. I plan to use the Remove-Item cmdlet in PowerShell to delete these registry entries.

For example, the PowerShell command I plan to use is:

Remove-Item -Path <registryPath> -Force -Recurse -Confirm:$false -ErrorAction Stop

Could anyone guide me on the exact registry keys or paths that correspond to the preferred languages settings in Microsoft Edge? Any assistance on how to identify and remove these entries correctly would be greatly appreciated.

P.S. I wonder if this setting is not stored in the registry but maybe in the C:\Users\$Env:UserName\AppData\Local\Microsoft\Edge\User Data\Default\Preferences JSON file. 🤔

P.S.2. I also posted this question here on Discord and here on Microsoft TechCommunity.

2
  • 1
    Why via powerhell?
    – Gantendo
    Commented May 15 at 8:46
  • @Gantendo because I want to automate it and not think about it again.
    – Foad
    Commented May 15 at 9:00

1 Answer 1

0

There is an Edge policy setting to define these. Normally, it's easiest to configure this using GPO or Intune policies, but you can set it locally with powershell too:

# HKLM=system-wide, HKCU=per-user
New-ItemProperty 'HKLM:\SOFTWARE\Policies\Microsoft\Edge\' `
  -Name DefinePreferredLanguages `
  -PropertyType REG_SZ `
  -Value "en-US,fr,es"

Note: this policy is Mandatory if set, so end users cannot change it

You can check whether it's been applied by going to about://policy in Edge

Microsoft Edge policy documentation

Supported language codes

12
  • Thanks for the comment. AS was also discussed here on Discord; I added this key manually, yet the languages remain after restarting the Edge browser.
    – Foad
    Commented May 15 at 16:02
  • @Foad does anything show up in the about://policy page? This policy should override the user-defined preferences if it applied properly (and didn't get removed/overwritten by a domain policy or something)
    – Cpt.Whale
    Commented May 15 at 21:19
  • @Foad - I don't have Discord. Relevant information should be included in the body of the question. Information on Discord is not guaranteed to exist tommorow.
    – Ramhound
    Commented May 15 at 23:43
  • @Ramhound, thanks for the comment. I understand your point, though all the necessary information was already in the comment and the original post. The link to the Discord discussion was for those who are interested in following the discussion.
    – Foad
    Commented May 16 at 8:01
  • 1
    I did a quick check with procmon, and I see that changing the preferred language list only updates a registry value here: HKCU:\SOFTWARE\Microsoft\Spelling\Dictionaries` named _Global_` (it looks like more of a MS Office integration though). These preferences are likely stored in the chromium user profile sqlite database - that can be edited too, but I haven't messed with it myself
    – Cpt.Whale
    Commented May 17 at 16:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .