S
S
Sergey Savostin2019-06-05 10:30:32
PowerShell
Sergey Savostin, 2019-06-05 10:30:32

How to add language and change system language via PowerShell?

There is Windows 10 Pro Eng.
There is remote access to PowerShell.
You need to give the command to download and install the Russian language and make it the system language.
Share a set of commands, pzhalsta.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Savostin, 2019-06-05
@savostin

Found the setup files that worked for me . I don’t know where they come from, how long they lie and how reliable they are.
If anyone knows where you can download the official files - share the link. Microsoft seems to be hiding them very well.
Installation process (you need to put the files previously downloaded from the link above somewhere, for example example.com/lang ):

# InstallLang.ps1 -LangName="ru-RU"
param(
   [string] $LangName
)

Invoke-WebRequest -Uri "http://example.com/lang/$LangName.cab" -OutFile "C:\Users\User\lp.cab"
DISM /NoRestart /Online /Add-Package /PackagePath:C:\Users\User\lp.cab
$Langs = Get-WinUserLanguageList
$Langs.Add("$LangName")
Set-WinUserLanguageList $Langs -Force
Set-WinUILanguageOverride $LangName.substring(0,2)
Set-Culture -CultureInfo "$LangName"
Set-WinSystemLocale -SystemLocale "$LangName"
Remove-Item –path "C:\Users\User\lp.cab"
Restart-Computer -Force

PS With Set-WinUILanguageOverride, it's a rough hack because "ru-RU" does not accept, only ru.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question