Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Windows 10 / An Internal Error has Occurred: Remote Desktop Connection Error

May 13, 2020 Windows 10Windows Server 2012 R2

An Internal Error has Occurred: Remote Desktop Connection Error

I saw a strange message “An internal error has occurred” when trying to connect from Windows 10 to a recently deployed RDSH server running Windows Server 2012 R2 using RDP. As lately as yesterday, the Remote Desktop connection to the server worked fine, but after the installation and configuration of RemoteApps and server restart, I was not able to connect to its desktop. Obviously, the Remote Desktop Services seems to be working, since a user is prompted for a password when connecting.

As I have understood, the RDP console message “An internal error has occurred” may appear in different cases and be caused by both Remote Desktop server and client issues. In this article I tried to describe all the ways to solve the problem and the scenario that had helped me.

windows 10 remote desktop connection error An internal error has occurred

First of all, make sure that the RDP port 3389 accepts connection on your RDS server, and that the connection is not blocked by the firewall (Test-NetConnection your_rdp_server –port 3389).

Having studied the RDP connection logs on the RDS server, I did not see any errors. The Microsoft-Windows-RemoteDesktopServices-RdpCoreTS/Operational log showed that the RDP session was created:

The server accepted a new TCP connection from client 192.168.1.60:64379.
Connection RDP-Tcp#4 created

However, the RDP session was terminated later without any error:

The server has terminated main RDP connection with the client.
The disconnect reason is 0

The server has terminated main RDP connection with the client: Microsoft-Windows-RemoteDesktopServices-RdpCoreTS

Check the status of the Remote Desktop Services on your remote server and restart the service. You can do it remotely through the Services.msc console (use the “Connect to another computer” option), but it is easier to check a service status and restart it using PowerShell:

(Get-Service TermService -ComputerName ny-rds1).status

The service is running, let’s restart it:

Get-Service TermService -ComputerName ny-rds1| Restart-Service –force –verbose

restart TermService powershell

But this did not solve the problem.

Here are some other ways to solve it I have managed to find in the Web:

  • If you see the EventID 1057 in the TerminalServices-RemoteConnectionManager event log (The RD Session Host Server has failed to create a new self signed certificate to be used for RD Session Host Server authentication on SSL connections), go to the folder C:\ProgramData\Microsoft\Crypto\RSA, rename the Machinekeys folder into Machinekeys_bak and restart the TermService;
  • I have also found that the RDP problem “An internal error has occurred” happened in Windows 10 1809 if the Configure H.264/AVC hardware encoding for Remote Desktop connections policy is enabled on the remote computer (it is located in the following GPO section: Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Remote Session Environment). To solve the problem, you just need to disable the UDP protocol for RDP by creating the fClientDisableUDP parameter with the value 1 in the registry key HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services\Client;
  • If the error appears immediately after clicking connect (the connection attempt seem to be immediately rejected by remote desktop server), try to increase the maximum outstanding RDP connections limit. On Windows 10 the SKUs by default is set to 100, but on Windows Server is 3000. Run the regedit.exe and create the DWORD registry parameter MaxOutstandingConnections with the value 10000 in the reg key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\. (The special RDP counter takes into account not quite correct RDP logins, and upon reaching the specified MaxOutstandingConnections value, the RDP access is blocked.)

Neither of the scenarios described above was applicable in my case. Occasionally, I found that other computers did not experience any problems when connecting to this RDS server. It meant that there was an issue with my computer, not with the Remote Desktop server.

I cleared the RDP connection history in the registry key HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Servers and reset the RDP cache in C:\Users\%Username%\AppData\Local\Microsoft\Terminal Server Client\Cache (prior to doing it, close all running mstsc.exe sessions):

del "C:\Users\%Username%\AppData\Local\Microsoft\Terminal Server Client\cache"

clean rdp cache cmd

Then I restarted my computer, and the RDP connection error disappeared!

7 comments
6
Facebook Twitter Google + Pinterest
previous post
Fix: Network Printer Goes Offline on Windows
next post
RDP Brute Force Protection with PowerShell and Windows Firewall Rules

Related Reading

How to Connect VPN Before Windows Logon

November 14, 2023

Using WPAD (Web Proxy Auto-Discovery Protocol) on Windows

November 7, 2023

Zabbix: How to Get Data from PowerShell Scripts

October 27, 2023

Tracking Printer Usage with Windows Event Viewer Logs

October 19, 2023

How to Use Ansible to Manage Windows Machines

September 25, 2023

7 comments

Serg May 13, 2020 - 10:13 am

I have this error then perform RDP connect frow Win10 to Win7. The problem is RD client from Windows 10 automatic use TLS 1.2 (default Security Protocol) negotiation, but Windows 7 only support TLS 1.0

Reply
infofree May 15, 2020 - 12:41 am

google is your friend., its not only 10>7 its old 7 to Updated 7, its also Digital Key Checking, the solution is out there if you look for it. use your Event ID from the log,and the error message you get and the OS vers

Reply
infofree May 15, 2020 - 12:42 am

Its actually an added FEATURE, not a BUG, thru updates to 7,it also broke the same thing, Admins had a nightmare if they didn’t have remote patch and Updates capable enterprise wide. 1 user fixing it on 1 station is EASY.

Reply
Den June 5, 2020 - 11:43 am

The following was help for me to fix this rdp bug:
Run the Certificates MMC as Local Machine -> find your Remote Desktop certificate -> Delete it -> and restart Remote Desktop Service (TermService )

Reply
Terry Grigg July 15, 2020 - 2:13 am

I found running the remote connection as administrator I could connect

Reply
Rafael January 28, 2022 - 4:01 pm

It’s work! Thank you.

This fixed to me: **MaxOutstandingConnections **

Reply
serg September 24, 2022 - 5:38 pm

Also check SSL/TLS settings and authentication level on RDP app

Reply

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • How to Connect VPN Before Windows Logon

    November 14, 2023
  • Removing Azure Arc Setup Feature on Windows Server 2022

    November 9, 2023
  • Using WPAD (Web Proxy Auto-Discovery Protocol) on Windows

    November 7, 2023
  • Send Emails with Microsoft Graph API and PowerShell

    November 6, 2023
  • Zabbix: How to Get Data from PowerShell Scripts

    October 27, 2023
  • Tracking Printer Usage with Windows Event Viewer Logs

    October 19, 2023
  • PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

    October 15, 2023
  • Reset Root Password in VMware ESXi

    October 12, 2023
  • How to Query and Change Teams User Presence Status with PowerShell

    October 8, 2023
  • How to Increase Size of Disk Partition in Ubuntu

    October 5, 2023

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • How to Disable UAC Prompt for Specific Applications in Windows 10?
  • How to Download APPX File from Microsoft Store for Offline Installation?
  • Fix: Windows Cannot Connect to the Shared Printer
  • How to Clean Up Large System Volume Information Folder on Windows?
  • Fixing “Winload.efi is Missing or Contains Errors” in Windows 10
  • Windows Doesn’t Automatically Assign Drive Letters
  • How to Hide Installed Programs in Windows 10 and 11
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top