Skip to content

Commit 2773be5

Browse files
committed
Update Set-Language.ps1
1 parent ea407cd commit 2773be5

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

scripts/Set-Language.ps1

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,39 @@ catch {
5757
# Exit 0 so that we don't hold up Autopilot
5858
exit 0
5959
}
60+
61+
62+
$Language = "en-AU"
63+
$RegionInfo = New-Object -TypeName "System.Globalization.RegionInfo" -ArgumentList $Language
64+
65+
$WindowsOverride = @"
66+
[
67+
{
68+
"path": "HKCU:\\Control Panel\\International\\User Profile",
69+
"name": "WindowsOverride",
70+
"value": "$($Language)",
71+
"type": "String"
72+
},
73+
{
74+
"path": "HKCU:\\Control Panel\\International\\User Profile",
75+
"name": "Languages",
76+
"value": "$($Language)",
77+
"type": "MultiStringProperty"
78+
},
79+
{
80+
"path": "HKCU:\\Control Panel\\International\\Geo",
81+
"name": "Name",
82+
"value": "$($RegionInfo.TwoLetterISORegionName)",
83+
"type": "String"
84+
},
85+
{
86+
"path": "HKCU:\\Control Panel\\International\\Geo",
87+
"name": "Nation",
88+
"value": "$($RegionInfo.GeoId)",
89+
"type": "String"
90+
}
91+
]
92+
"@
93+
94+
# Set the default Region
95+
Set-DefaultUserProfile -Setting ($WindowsOverride | ConvertFrom-Json) @prefs

0 commit comments

Comments
 (0)