Posted On November 11, 2020

How to Enforce Keyboard Layout Consistency for Remote Desktop

kimconnect 0 comments
blog.KimConnect.com >> Codes >> How to Enforce Keyboard Layout Consistency for Remote Desktop
# The following function will allow the RDP session to store the user keyboard language preference as stored in the session profile.
# This bypasses the default layout provided by the Terminal Server client.
# In other words, the default keyboard layout and input language can be set by the user and saved in that profile - a log-off is required after changing this setting. All later user logons will use the default keyboard layout and input language from this profile.
# This saves users the efforts of having to manually (shitft-alt) switch the layout after each login.

function setRdpKeyboardPerProfile{
	$keyboardRegKey='REGISTRY::HKLM\SYSTEM\CurrentControlSet\Control\Keyboard Layout'
	$keyName='IgnoreRemoteKeyboardLayout'
	$keyValue=1
	Set-ItemProperty -Path $keyboardRegKey -Name $keyName -Value $keyValue -Type DWORD -Force
}
setRdpKeyboardPerProfile

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

PowerShell: Obtain Computer Account Parent Container from Invoke-Command

# ObtainComputerAccountParentContainer.ps1# This is a demonstration of how to pass function into an invoke-command as…

PowerShell: Compare File Counts of 2 Directories

$folder1='C:\Temp' $folder2='C:\Temp2' $username=$null $password=$null function compareFileCounts{ param($folder1,$folder2,$mountAsUser,$mountAsPassword) function mountPathAsDrive($path,$driveLetter,$mountAsUser,$mountAsPassword){ function convertPathToUnc($path,$computername=$env:computername,$credentials=$null){ $pathIsUnc=$path -match '^\\\\' $pathIsReachable=if($credentials){test-path…

PowerShell: Scan a Subnet for Used and Unused IPs

A newer version of this script is available here. function scanForAvailableIPs{ param( $cidrBlock=$( $interfaceIndex=(Get-WmiObject -Class…