I made a simple script that delete all keyboard layout and install the one i want.
Everything seems to work, the layout are deleted and the correct layout is installed afterwards. The problem is each time i reboot (any computer or VM i try the script on) all previously deleted keyboard are back.
If i delete the keyboard manualy in Windows they dont come back, i think something is missing in the code and i cant figure out what and why.
This is the code i use :
$langue = Get-WinUserLanguageList
$langue.Clear()
$langue.add("fr-CA")
$langue[0].InputMethodTips.Clear()
$langue[0].InputMethodTips.Add('0C0C:00001009')
Set-WinUserLanguageList $langue -Force
Set-WinUILanguageOverride -Language fr-CA
Set-WinCultureFromLanguageListOptOut -OptOut $true
Set-Culture fr-CA
Set-WinHomeLocation -GeoId 39
Set-WinSystemLocale -SystemLocale fr-CA