Inactive TS Ports: Windows Server 2019 Printer Redirect

Kevin Bohlmann 21 Reputation points
2021-04-08T22:01:17.537+00:00

Environment: Windows 10 Pro Location Computer: Located in an office Environment
Windows Server 2019 Server : Located in a separate office Environment
Problem:
This environment has been set up so Windows 10 local machine can use remote desktop to the server in order to access the backend of the database systems in place. The local Windows 10 machine is using Printer redirection over Remote Desktop in order to allow printing from the server to the printer located in the Windows 10's office environment. Over time we have noted an increase in inactive TS ports on the printer ports on the Windows Server.

My question is if these ever increasing ports is going to create performance issues with the server, and if there is a way to prevent this from occurring.

Remote Desktop
Remote Desktop
A Microsoft app that connects remotely to computers and to virtual apps and desktops.
4,240 questions
Windows Server Printing
Windows Server Printing
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Printing: Printer centralized deployment and management, scan and fax resources management, and document services
640 questions
0 comments No comments
{count} votes

Accepted answer
  1. Anonymous
    2021-04-12T13:20:06.723+00:00

    Hi

    Actually, the inactive TS ports should be deleted during the restart of the Terminal Server. And it's not available to prevent Remote Desktop Service Device Redirector Service from creating a new port each session. However, the following suggestions show which possibilities are available ways with the question on your concerned.

    Firstly, by default, it can only be deleted manually. Of course, the user can delete the inactive port registry periodically by running the following PowerShell script when logging off the user session.
    Use PowerShell to delete the inactive port registry, please refer to this link. https://www.bvanleeuwen.nl/faq/?p=1423
    Using GPO to Running PowerShell Startup (Logon) Scripts, please refer to this link. http://woshub.com/running-powershell-startup-scripts-using-gpo/

    Secondly, you can enter get-hotfix in the PowerShell of Windows 10 and the Windows Server 2019 to see which patches are currently installed. Check and install the latest patch in Windows 10 and Windows Server 2019 to see if the issue fixed.

    Please note: Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.

    If the answer is helpful, please click "Accept Answer" and upvote it.

    Best regards

    1 person found this answer helpful.
    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Anonymous
    2021-04-09T10:44:04.69+00:00

    Hi, dear

    For your concern about several issues that have been associated with a high number of inactive Terminal Server ports. This behavior may cause performance issues such as slow boot, delayed logon times to RDP sessions, system hangs, failure to redirect printers, or slow server performance due to registry bloat from all the ports.

    This issue occurs because the Remote Desktop Services Device Redirector service creates a new port every time that an RD session is established.
    However, the inactive ports are not recycled. Instead, the inactive ports for the redirected printers accumulate under the following registry key on the server:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses{28d78fad-5a12-11d1-ae5b-0000f803a8c2}##?#Root#RDPBUS#0000#{28d78fad-5a12-11d1-ae5b-0000f803a8c2}\

    In such cases, if you want to manually delete the inactive ports, please try to delete them via registry entry as mentioned above. However, it may affect your production RDS system, and relate service reboot might be necessary.

    If the answer is helpful, please click "Accept Answer" and upvote it.

    Best regards

    1 person found this answer helpful.

  2. Anonymous
    2021-04-15T07:42:07.687+00:00

    Hi,

    Haven't received your message in a few days, was your issue resolved?

    I am proposing previous helpful replies as "Answered". Please feel free to try it and let me know the result. If the reply is helpful, please remember to mark it as an answer which can help other community members who have the same questions and find the helpful reply quickly.

    Best regards,

    0 comments No comments

  3. Maria Lucia Santos Chable 0 Reputation points
    2024-04-06T19:38:35.36+00:00

    Buenas tardes, requiero de su ayuda, cuento con un servidor que tiene instalado Windows Sever 2022 Datacenter, requiero instalar una impresora de Ticket térmica (POS-H58) a través de una conexión dyndns pero al agregarlo elijo el puerto en este caso es TS088, una vez agregado si funciona, pero al momento de apagar el equipo y encender me dice que esta inactivo. como lo puedo dejar estática. Ayuda por favor