Resolved: PowerShell Keyboard Input Issue in RDS Sessions
While using a Remote Desktop Services (RDS) deployment with the HTML5 web client, you may encounter a frustrating issue: keyboard input fails in the PowerShell console during a session. This peculiar behavior limits accepted inputs to the Enter key or Ctrl+ combinations, leaving other key presses unresponsive. Interestingly, this issue doesn’t occur in PowerShell ISE, which accepts keyboard inputs without any trouble.

Symptoms
The issue presents as follows:
- You install the latest RDS HTML5 web client as detailed in the official Microsoft documentation.
- After launching a web browser session, you start an RDS session.
- Keyboard input does not work in the PowerShell console.
- Keyboard input works perfectly in PowerShell ISE.
Root Cause
This issue arises due to an outdated version of the PSReadLine module, which handles the command-line editing experience in PowerShell. Certain older versions of PSReadLine are known to conflict with the RDS HTML5 web client, leading to input issues.
Solution: Update the PSReadLine Module
Step 1: Check the Current Version of PSReadLine
Before proceeding, confirm which version of PSReadLine is installed. Open PowerShell and run:
Get-Module PSReadLine
This will output the module type, version, and name. If the version is older than the latest available version (e.g., 2.3.6 at the time of writing), you’ll need to update it.
Step 2: Install the Latest Version of PSReadLine
To update PSReadLine to the latest version, run the following command:
Install-Module -Name PSReadLine -Force
Step 3: Verify the Update
After the installation completes, verify that the PSReadLine module has been updated:
Get-Module PSReadLine
The output should now display:
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 2.3.6 PSReadline {Get-PSReadLineKeyHandler, Get-PSReadLineOption, Remove-PS...
Step 4: Restart the PowerShell Console
After updating, close the PowerShell console and start a new session. Test the keyboard input in your RDS session. The issue should now be fully resolved.
If you encounter similar issues in the future, remember to keep your PowerShell modules up-to-date and check for known compatibility issues in your environment. Happy troubleshooting!