Forum Discussion
RahamimL
Feb 15, 2022Iron Contributor
Intune auto pilot international settings
Hi everyone,
I'm trying to achieve the following for new computers in autopilot:
- Set time zone to my time zone
- Set system locale, culture and windows home location to my country
- Set a language list to use en-US and my country's language
- Make sure that my country language is installed on the compute
In MECM this is the Apply windows settings which looks like this:
The end result I'm looking for is this:
I searched the web and also found the Copy-UserInternationalSettingsToSystem, but this is for windows 11... We are still deploying windows 10.
I found and tested multiple options such as deploying the LXP and using several powershell commands to apply what I need but it doesn't exactly work.
This is my autopilot profile:
Is there a way to use some unattended file or any other way to configure the operating system to our international settings?
Rahamim.
Rudy_Ooms_MVP thanks for your help.
My xml was wrong. I ended up creating a different app with a CMD file in it and the xml inside the win32 package. I also separated the PowerShell script to add the language to a different win32 package.
For anyone requiring something similar here is my xml:
<gs:GlobalizationServices xmlns:gs="urn:longhornGlobalizationUnattend">
<gs:UserList>
<gs:User UserID="Current" CopySettingsToDefaultUserAcct="true" CopySettingsToSystemAcct="true"/>
</gs:UserList><!-- GeoID -->
<gs:LocationPreferences>
<gs:GeoID Value="117"/>
</gs:LocationPreferences><gs:MUILanguagePreferences>
<gs:MUILanguage Value="en-US"/>
<gs:MUIFallback Value="he-IL"/>
</gs:MUILanguagePreferences><!-- system locale -->
<gs:SystemLocale Name="he-IL"/><!-- input preferences -->
<gs:InputPreferences>
<gs:InputLanguageID Action="add" ID="0409:00000409"/>
<gs:InputLanguageID Action="add" ID="040D:0002040D"/>
</gs:InputPreferences>
<gs:UserLocale>
<gs:Locale Name="he-IL" SetAsCurrent="true" ResetAllSettings="false">
</gs:Locale>
</gs:UserLocale>
</gs:GlobalizationServices>For detection of the application:
try{ $DefaultHive = "microsoft.powershell.core\Registry::HKEY_USERS\.DEFAULT" $CP = Join-Path -Path $DefaultHive -ChildPath "Control Panel\International" $KL = Join-Path -Path $DefaultHive -ChildPath "Keyboard Layout\Preload" $DHCP = Get-ItemProperty -Path $CP $DHKL = Get-ItemProperty -Path $KL if($DHCP.Locale -eq "0000040D" ` -and $DHCP.LocaleName -eq "he-IL" ` -and $DHCP.iCountry -eq "972" ` -and $DHKL.1 -eq "00000409" ` -and $DHKL.2 -eq "0000040D"){ Write-Output "Profile international settings were copied successfully" exit 0 }else{ Write-Error "Error copying profile international settings" exit 1 } }catch{ $ErrorMessage = $_.Exception.Message Write-Error $ErrorMessage exit 1 }
Rahamim
- RahamimLIron Contributor
I was able to run trials on a VM and I can't get this to work.
I created a win32 app deployed to system with the following script:
$Hebrew = Get-WindowsCapability -online -Name lang*he* | Where-Object displayname -Match "hebrew"
foreach($h in $Hebrew){if($h.State -ne "Installed"){Add-WindowsCapability -Online -Verbose -Name $h.name}}
Set-WinSystemLocale -SystemLocale he-IL
Set-Culture -CultureInfo he-IL
Set-WinHomeLocation -GeoId 117
Set-WinUserLanguageList en-US,he-IL -Force
$XMLfile = @"
<gs:GlobalizationServices xmlns:gs="urn:longhornGlobalizationUnattend"><!-- user list -->
<gs:UserList>
<gs:User UserID="Current" CopySettingsToDefaultUserAcct="true" CopySettingsToSystemAcct="true"/>
</gs:UserList><!-- system locale -->
<gs:SystemLocale Name="he-IL"/><!-- input preferences -->
<gs:InputPreferences>
<gs:InputLanguageID Action="add" ID="0409:00000409"/>
<gs:InputLanguageID Action="add" ID="040D:0000040D"/>
<!--gs:InputLanguageID Action="remove" ID="0409:00000409"/-->
</gs:InputPreferences></gs:GlobalizationServices>
"@
New-Item -Path $env:TEMP -Name "intlcfg.xml" -Value $XMLfile -Force -Verbose
$XMLPath = Join-Path $env:Temp -ChildPath "intlcfg.xml"
& $env:windir\System32\control.exe "intl.cpl,,/f:`"$XMLPath`""
Start-Sleep 5
& $env:windir\System32\control.exe "intl.cpl,,/f:`"$XMLPath`""
Get-Item -Path (Join-Path $env:TEMP -ChildPath "intlcfg.xml") | Remove-Item -VerboseIf I run this manually in an OOBE fresh installation, I get the expected result. but when I try it during autopilot the settings don't copy.
Rahamim.
- Hi.. Is the XML file even created or just not executed
- RahamimLIron Contributor
Rudy_Ooms_MVP thanks for your help.
My xml was wrong. I ended up creating a different app with a CMD file in it and the xml inside the win32 package. I also separated the PowerShell script to add the language to a different win32 package.
For anyone requiring something similar here is my xml:
<gs:GlobalizationServices xmlns:gs="urn:longhornGlobalizationUnattend">
<gs:UserList>
<gs:User UserID="Current" CopySettingsToDefaultUserAcct="true" CopySettingsToSystemAcct="true"/>
</gs:UserList><!-- GeoID -->
<gs:LocationPreferences>
<gs:GeoID Value="117"/>
</gs:LocationPreferences><gs:MUILanguagePreferences>
<gs:MUILanguage Value="en-US"/>
<gs:MUIFallback Value="he-IL"/>
</gs:MUILanguagePreferences><!-- system locale -->
<gs:SystemLocale Name="he-IL"/><!-- input preferences -->
<gs:InputPreferences>
<gs:InputLanguageID Action="add" ID="0409:00000409"/>
<gs:InputLanguageID Action="add" ID="040D:0002040D"/>
</gs:InputPreferences>
<gs:UserLocale>
<gs:Locale Name="he-IL" SetAsCurrent="true" ResetAllSettings="false">
</gs:Locale>
</gs:UserLocale>
</gs:GlobalizationServices>For detection of the application:
try{ $DefaultHive = "microsoft.powershell.core\Registry::HKEY_USERS\.DEFAULT" $CP = Join-Path -Path $DefaultHive -ChildPath "Control Panel\International" $KL = Join-Path -Path $DefaultHive -ChildPath "Keyboard Layout\Preload" $DHCP = Get-ItemProperty -Path $CP $DHKL = Get-ItemProperty -Path $KL if($DHCP.Locale -eq "0000040D" ` -and $DHCP.LocaleName -eq "he-IL" ` -and $DHCP.iCountry -eq "972" ` -and $DHKL.1 -eq "00000409" ` -and $DHKL.2 -eq "0000040D"){ Write-Output "Profile international settings were copied successfully" exit 0 }else{ Write-Error "Error copying profile international settings" exit 1 } }catch{ $ErrorMessage = $_.Exception.Message Write-Error $ErrorMessage exit 1 }
Rahamim
Hi
Normally I would say to create a powershell script with the additional language cab in it. And configure all settings you want in that powershell script. as example
DISM /Online /Add-Package /PackagePath: .\lp.cab
Set-WinUILanguageOverride <xx-xx> (where xx-xx is your language culture)And convert it to a win32 app and deploy it as an required app during autopilot esp?
Could you show us what you have tried until know?- RahamimLIron ContributorThanks for the reply,
I just found found the site Michael Niehus' website https://oofhours.com/ and realized I only did half of what AutoPilot has to offer. I found out I didn't use the enrollment status page . I'm trying to work with it now to see if that will do what I'm looking for.
Also, can someone tell me the keyboard shortcut to open cmd in ESP?- Hi, Shift + f10... but that one needs to be removed 😛
https://call4cloud.nl/2022/01/the-oobe-massacre-the-beginning-of-shift-f10/
I guess also did some blogs about autopilot and some tpm stuff..