Created
November 10, 2017 12:53
-
-
Save danjpadgett/c74d4f074781b8cabee9eb071bd54bf3 to your computer and use it in GitHub Desktop.
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
<# | |
.SYNOPSIS | |
Install and set system language to en-us | |
.DESCRIPTION | |
provide cab names , see line 22,23 | |
danjpadgett - execmgr.net | |
#> | |
If ( (dism /online /Get-Intl) | ?{ $_.Contains("Installed language(s): en-US") } ) | |
{ | |
Write-Host 'en-US installed' | |
return $true | |
} | |
Else | |
{ | |
Import-Module International | |
Write-Host 'en-US Missing' | |
if ([System.Environment]::OSVersion.Version.Build -eq 10586) {$lp = .\lp-W101511.cab} | |
if ([System.Environment]::OSVersion.Version.Build -eq 9200) {$lp = .\LP-w81.cab} | |
#Install en-US Lang Pack for 1511 | |
{ | |
Invoke-Command -ScriptBlock {dism /online /Add-Package /PackagePath:$lp} | |
Set-WinSystemLocale -SystemLocale en-US | |
# Set regional format (date/time etc.) to English (Australia) - this applies to all users | |
Set-Culture en-AU | |
Set-WinUILanguageOverride -Language en-US | |
Set-WinUserLanguageList en-AU -Force -ErrorAction SilentlyContinue | |
Set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\Nls\Language -Name Default -Value '0409' | |
Set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\Nls\Language -Name InstallLanguage -Value '0409' | |
#Reboot is required for settings to take affect. Disabled to allow SCCM TS to initiate reboot. | |
#shutdown /r /t 120 /c "Fixing missing languages, machine will reboot" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment