PowerShell functions & DSC Resource to add / remove Keyboard Layout (Input Locales).
This module only supports Windows 7 & Windows 10
You can install from PowerShell Gallery.
Install-Module -Name DSCR_KeyboardLayout
- cKeyboardLayout PowerShell DSC Resource add / remove Keyboard Layouts.
-
[string] Ensure (Write):
- Specify installation state of the keyboad layouts.
- The default value is
Present
. (Present
orAbsent
)
-
[string] KeyboardLayout (Key):
- The input profiles are made up of a "language identifier" and a "keyboard identifier".
- For details and list of IDs, see the documents of Microsoft
- You can specify not only ID, but also friendly name of profile. For example, you can specify
"fr-FR:French"
instead of"040c:0000040c"
. - If you want to specify multiple layouts, separate them with a comma.
-
[string] Default (Write):
- Specify a keyboard layout that will set to user's default layout.
-
[boolean] ClearExist (Write):
- If you specify this property to
$true
, all existing keyboard layout will be removed. - The default value is
$false
.
- If you specify this property to
-
[boolean] CopySettingsToSystemAcct (Write):
- Set up not only for users but also for system accounts.
- [IMPORTANT] This property is only on Windows 7.
-
[boolean] CopySettingsToDefaultUserAcct (Write):
- Set up not only for users but also for default user account.
- [IMPORTANT] This property is only on Windows 7.
- Example 1: Install french keyboard layout
Configuration Example1
{
Import-DscResource -ModuleName DSCR_KeyboardLayout
cKeyboardLayout KeyboardLayout_Sample
{
KeyboardLayout = 'fr-FR:French'
PsDscRunAsCredential = $UserCredential
}
}
- Example 2: Clear existing layout & Add multiple layouts
Configuration Example2
{
Import-DscResource -ModuleName DSCR_KeyboardLayout
cKeyboardLayout KeyboardLayout_Sample
{
KeyboardLayout = 'ja:Microsoft IME (Japanese),en-US:United States-Dvorak,zh-Hant-TW:Microsoft Changjie'
Default = 'ja:Microsoft IME (Japanese)'
ClearExist = $true
PsDscRunAsCredential = $UserCredential
}
}
- We confirmed that this module works on Windows 10 version 1809
- Add new language ID
zh-Hans-CN
&nqo
(only on Windows 10)
- Bug fix #4
- Fix minor issue in module manifest
- Windows 10 support
- Bug fix