Powershell 5.1 not accepting keyboard input when using Remote Desktop HTML5 Web Client

Ag-8821 41 Reputation points
2023-03-24T15:25:41.6533333+00:00

Install the latest RDS HTML5 client on a RDS deployment as specified here: https://learn.microsoft.com/en-us/windows-server/remote/remote-desktop-services/clients/remote-desktop-web-client-admin

  1. Open a web browser session and start an RDS session.
  2. Start powershell
  3. keyboard input not working
  4. start Powershell ISE
  5. keyboard input works fine

The only key input that is accepted is the enter key or Ctrl+ combinations.

Windows Server 2022

Edge Browser Version 111.0.1661.51 (Official build) (64-bit)

PS Version:

Name                           Value                                           
----                           -----                                           
PSVersion                      5.1.20348.1366                                  
PSEdition                      Desktop                                         
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                         
BuildVersion                   10.0.20348.1366                                 
CLRVersion                     4.0.30319.42000                                 
WSManStackVersion              3.0                                             
PSRemotingProtocolVersion      2.3                                             
SerializationVersion           1.1.0.1
Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,647 questions
Remote Desktop
Remote Desktop
A Microsoft app that connects remotely to computers and to virtual apps and desktops.
4,646 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,584 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,704 questions
0 comments No comments
{count} votes

5 answers

Sort by: Most helpful
  1. Nicolas Guilhot 35 Reputation points
    2024-05-31T09:56:53.34+00:00

    Hi,
    I had the same issue, and in my case I could fix it by updating PSReadLine module to a newer version.

    Check your current PSReadLine version

    PS C:\Windows\system32> Get-Module PSReadLine
    
    ModuleType Version    Name                                ExportedCommands
    ---------- -------    ----                                ----------------
    Script     2.0.0      PSReadline                          {Get-PSReadLineKeyHandler, Get-PSReadLineOption, Remove-PS...
    

    Update PSReadLine to latest version

    PS C:\Windows\system32> Install-Module PSReadLine -Force
    

    Close PowerShell console and start a new one and you should be able to use your keyboard as expected

    PS C:\Windows\system32> Get-Module PSReadLine
    
    ModuleType Version    Name                                ExportedCommands
    ---------- -------    ----                                ----------------
    Script     2.3.5      PSReadline                          {Get-PSReadLineKeyHandler, Get-PSReadLineOption, Remove-PS...
    
    7 people found this answer helpful.

  2. Limitless Technology 44,526 Reputation points
    2023-03-27T12:06:23.72+00:00

    Hello there,

    Have you used an on-screen keyboard in your remote session and see if you can type?

    Check the PowerShell settings: You may need to adjust the PowerShell settings to allow input from a web client. Run Set-ExecutionPolicy RemoteSigned to allow remote scripts to be executed.

    Beginning in PowerShell 6.0 for non-Windows computers, the default execution policy is Unrestricted and can't be changed. The Set-ExecutionPolicy cmdlet is available, but PowerShell displays a console message that it's not supported. https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-executionpolicy?view=powershell-7.3

    Hope this resolves your Query !!

    --If the reply is helpful, please Upvote and Accept it as an answer–

    1 person found this answer helpful.

  3. Thomas 6 Reputation points
    2023-09-28T14:47:23.3933333+00:00

    We had some issues with RDWeb and Anaconda (and Anaconda Powershell) for us the solution was to enable (at client side) inputh method editor. The keyboard layout we keep empty because we would like ENG-US(INTL) You can find this in the RDWeb settings menu (gear wheel).

    What I miss is an option to enable this at the server side so users won't have to do this manually. Therefore I created this idea: https://techcommunity.microsoft.com/t5/azure-virtual-desktop-feedback/rdwebclient-enable-input-method-editor-by-default/idi-p/3939231

    1 person found this answer helpful.
    0 comments No comments

  4. Corey Clements 0 Reputation points
    2023-08-22T17:46:57.84+00:00

    Was there any resolution to this?

    We are experiencing the exact same PowerShell 5.1 Build 20348 Revision 1850 typing issue using RD HTML5 webclient (version 1.0.28.0) to our Windows Server 2022 Datacenter RDS Session Hosts. PowerShell 7.3 and other consoles work fine.

    But no issues using same RD HTML5 webclient to Windows Server 2019 Standard and Windows Server 2012 R2 RDS Session Hosts.

    0 comments No comments

  5. _ndnsu 0 Reputation points
    2024-03-26T13:41:29.3566667+00:00

    If using Linux Remmina/FreeRDP, then disable "Use client keyboard mapping" in Remmina Preferences.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.