Getting the keyboard layout using PowerShell
2013, Jan 10
Just a little PowerShell script to grab the keyboard layout(s) of the current user;
[string]$HiveKey = “HKCU:\Keyboard Layout\Preload”
$Values=(Get-Item $HiveKey).GetValueNames() | Sort -Descending
ForEach ($Value in $Values)
{
Write-Host SetLocale (Get-ItemProperty $HiveKey).($value)
}