Blog

This article covers several solutions to common performance issues with RDS servers and published RemoteApp applications on Windows Server 2019/2016. These solutions will help eliminate delays in user operations if your infrastructure experiences slow RDS or RemoteApp performance. Before applying any solution, ensure it is compatible with your infrastructure.

You can purchase original Windows Server RDS CAL product keys from our catalog:

Windows Server 2019 RDS User CAL – 23.70 €

Windows Server 2016 RDS User CAL – 18.90 €

Performance Issues with RDS in Windows Server 2016/2019 with User Profile Disks (UPD)

One common issue on RDS servers running Windows Server 2016/2019 is performance degradation when using user profiles stored on User Profile Disks (UPD). The problem stems from Windows Defender Firewall creating new inbound and outbound rules each time a user logs in, and these rules are not removed after the session ends.

Over time, the number of rules can reach a critical level, causing slowdowns in RDS server performance: slow logins, black screens during RDP connections, RDS host freezes, issues with the Start menu, and more.

How to Check the Number of Rules in Windows Defender Firewall:

Use the following PowerShell command:

(Get-NetFirewallRule).count

In our case, one of the hosts had 18,000 rules! These rules are created for Windows Store UWP applications with each user login.

Solution:

1. Install all the latest security updates for your version of Windows Server (recommended patches: KB4467684 for Windows Server 2016 and KB4490481 for Windows Server 2019).

2. Create the following registry parameter on the RDS host to automatically delete rules:

Registry key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy

Parameters:

– Type: REG_DWORD

– Name: DeleteUserAppContainersOnLogoff

– Value: 1

PowerShell command to create the parameter:

New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy" -Type DWord -Name DeleteUserAppContainersOnLogoff -Value 1

3. If you have multiple RDS hosts, distribute this parameter via Group Policy (GPO).

4. Manually clean up firewall rules using PowerShell or ready-made scripts from forums, such as [TechNet](https://social.microsoft.com/Forums/Azure/en-US/992e86c8-2bee-4951-9461-e3d7710288e9/windows-servr-2016-rdsh-firewall-rules-created-at-every-login?forum=winserverTS).

For a more stable solution, consider using FSLogix for user profile containers instead of UPD.

Mouse Issues in RDP Sessions on Windows Server 2019/2016

After migrating to Windows Server 2019, many users reported mouse issues in RDP sessions: the cursor responds slowly, jitters, or freezes.

This can be caused by a high polling rate (Report Rate) and DPI resolution of certain mice, especially gaming ones (e.g., the Logitech G203 has a default polling rate of 1000 Hz). A high polling rate creates a load on the RDP connection and can cause slowdowns.

Solution:

1. Reduce the mouse polling rate to 125 Hz using the mouse manufacturer’s configuration utility.

2. If this is not possible, try disabling the cursor shadow in the mouse settings (Control Panel, main.cpl) and set the pointer scheme to “None”.

Slow RemoteApp Performance in Windows 10

After updating Windows 10 clients to versions 1803 and 20H2, many users encountered issues with RemoteApp applications on RDS servers. Application menus may render slowly, menu items may require multiple clicks to activate, and RemoteApp windows may slow down by 2-3 times.

Temporary Solution:

Change the Use advanced RemoteFX graphics for RemoteApp setting to “Disabled” in the Local Group Policy Editor:

Computer Configuration -> Policies -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Remote Session Environment

If graphical applications, such as CAD, are published, they may not function correctly without RemoteFX.

Additional Solution – Replacing the RDP Client Version

RemoteApp issues have been observed starting with Windows 10 version 1709. You can temporarily resolve the issue by replacing the RDP client files (mstsc.exe and mstscax.dll) with older versions from Windows 10 builds 1607 or 1703.

Steps to Replace RDP Client Files:

1. Download the archive with RDP files (mstsc-w10-1607) from Windows 10 1607.

2. Copy the original mstsc.exe and mstscax.dll files from C:\Windows\System32 to C:\Backup:

md c:\backup\

copy C:\windows\system32\mstsc.exe c:\backup

copy C:\windows\system32\mstscax.dll c:\backup

3. Assign ownership of the files to your account and disable inheritance:

takeown /F C:\windows\system32\mstsc.exe

takeown /F C:\windows\system32\mstscax.dll

icacls C:\windows\system32\mstsc.exe /inheritance:d

icacls C:\windows\system32\mstscax.dll /inheritance:d

icacls C:\windows\system32\mstsc.exe /grant root:F

icacls C:\windows\system32\mstscax.dll /grant root:F

(In this example, the local account with administrative privileges is named “root”. Replace it with your account name.)

4. Replace the files in the C:\windows\system32\ directory with the versions from the archive.

5. Restore the original permissions on the replaced files. Enable NTFS permission inheritance and set the owner to NT Service\TrustedInstaller:

icacls C:\windows\system32\mstsc.exe /inheritance:e

icacls C:\windows\system32\mstscax.dll /inheritance:e

icacls C:\windows\system32\mstsc.exe /setowner "NT Service\TrustedInstaller" /T /C

icacls C:\windows\system32\mstscax.dll /setowner "NT Service\TrustedInstaller" /T /C

6. Re-register the library:

regsvr32 C:\Windows\System32\mstscax.dll

This solution will temporarily fix the RemoteApp performance issue on Windows 10 clients.

This article covered solutions to common performance issues with RDS and RemoteApp in Windows Server 2019/2016. If your infrastructure experiences delays or slowdowns when using RDS, apply the provided recommendations after verifying their compatibility with your environment.

banner for Windows Server 2019
Buy Windows Server 2019 product key from
12.00 € Find Out More
Subscribe
Notify of
guest
0 comments
Newest
Oldest
Inline Feedbacks
View all comments