How to Remove Remote Desktop Connection History in Windows

How to Remove Remote Desktop Connection History in Windows blog banner image

Accessing computers remotely has become easier nowadays, thanks to features and tools that help in carrying out this task. Remote Desktop Connection (RDC) is one of these tools developed by Microsoft for Windows that allows users to connect remotely to other computers. This tool has been used for remote work and support, server management, Virtual Desktop Infrastructure (VDI), and more. Each time users connect to a remote computer using RDC, Windows saves the connection history for quick access in the future.

However, IT administrators are given the option to delete these saved connections for specific reasons. These reasons may include privacy or the prevention from others seeing which computers you accessed, security involving deterrence from unauthorized access to saved remote systems, and troubleshooting purposes that require clearing corrupted or outdated entries that might cause connection issues. In this article, we will guide you in the various methods of removing Remote Desktop Connection history in Windows.

Where Remote Desktop Connection History is Stored

As mentioned, Windows saves the connections you made using Remote Desktop Connection. These saved connections are stored in locations such as registry entries, jump lists, and cached credentials. Here’s a deep dive into the specific locations:

1. Registry entries

The Windows Registry is the primary location where RDC stores connection history. Two specific registry keys contain this information:

  • HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default which stores a list of recently accessed remote computers.
  • HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Servers which stores subkeys for each remote computer accessed.

2. Jump lists

Jump lists or taskbar history provide quick access to recently used items within applications, including RDC. When RDC is pinned to the taskbar, previously connected computers may appear in its jump list. These entries are stored in the following location:

  • %APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations
  • %APPDATA%\Microsoft\Windows\Recent\CustomDestinations

3. Cached credentials

Cached credentials or Windows Credential Manager store login credentials if the “Remember me” option is selected during an RDC session. To access saved RDC credentials:

  1. Open Control Panel > Credential Manager
  2. Select Windows Credentials
  3. Look for saved entries under TERMSRV/<remote-computer-name>

A Step-by-Step Guide and Methods to Remove RDC History

A. Using Windows Registry

1. Open Registry Editor:

    • Press Win + R, type regedit, and press Enter.

2. Navigate to Connection History:

    • Go to: HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default
    • In the right pane, right-click each MRU# entry and select Delete.

3. Remove Saved Servers:

    • Navigate to: HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Servers
    • Right-click on the computer name you want to delete and select Delete.

4. Close Registry Editor:

    • Restart the Remote Desktop Connection tool to verify the entries are gone.

B. Clearing RDC History via Command Prompt

1. Open Command Prompt as Administrator:

    • Press Win + R, type cmd, and press Ctrl + Shift + Enter.

2. Delete Stored RDC Entries:

    • Run the following command:
      • reg delete “HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default” /f
    • Then delete the saved servers:
      • reg delete “HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Servers” /f

3. Close Command Prompt.

C. Removing Entries Using Group Policy Editor (For Administrators)

1. Open Group Policy Editor:

    • Press Win + R, type gpedit.msc, and press Enter.

2. Navigate to Remote Desktop Policies:

    • Go to: Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Connections

3. Disable History Storage:

    • Find Do not allow saved credentials and Do not allow last username policies.
    • Double-click each setting, select Enabled, and click OK.

4. Close Group Policy Editor:

    • Restart your computer to apply changes.

D. Deleting RDC Jump List Entries (File Explorer Method)

1. Open File Explorer:

    • Press Win + E.

2. Navigate to Jump List Folder:

    • Go to: %APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations

3. Locate the Jump List File:

    • Look for a file named 1b4dd67f29cb1962.automaticDestinations-ms.

4. Delete the File:

    • Right-click and select Delete.

5. Restart File Explorer:

    • Press Ctrl + Shift + Esc, right-click Windows Explorer, and select Restart.

E. Using Third-Party Tools

1. Download a Trusted Cleaning Tool:

    • Examples: CCleaner, BleachBit.

2. Run the Tool and Select RDC History:

    • Open the tool and look for options related to Windows history or MRU lists.

3. Clear the History:

    • Follow on-screen instructions to remove RDC traces.

4. Close the Tool and Restart RDC.

Preventing Remote Desktop from Storing History

To stop Windows from saving RDC history in the future:

A. Disable Registry Entries:

  • Open Registry Editor and navigate to
    HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation
  • Create a DWORD (32-bit) Value named DisablePasswordSaving and set it to 1.

B. Configure Group Policy:

  • Open Group Policy Editor (gpedit.msc).
  • Navigate to:
    Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services
  • Enable Do not allow saved credentials.

C. Use a Portable RDC Client:

  • A portable version of RDC does not retain history.

Use Cases for Clearing RDC History

Removing Remote Desktop Connection History serves many purposes. Here are the most common use cases for clearing RDC history.

1. Protecting sensitive information

Removing RDC history is an efficient security measure to protect sensitive information, especially when using shared or public computers. This action deters unauthorized users from seeing or even configuring previously accessed systems. Leaving RDC history uncleared may expose critical information such as internal server names and network details. That’s why it’s just reasonable for some to clear RDC history to reduce security risks.

2. Troubleshooting connection issues

Clearing the RDC history forces the system to fetch fresh connection details. If an IP address changes, DNS records update, or credentials become outdated. Stored RDC entries that are outdated or corrupted may cause connection issues, authentication failures, or persistent problems when connecting to remote systems. That’s why IT administrators remove these RDC entries to help resolve errors and ensure smooth remote access.

3. Enhancing privacy in corporate environments

In corporate settings, leaving RDC history on a shared or company-issued device can be a catalyst for unauthorized access or credential-based attacks. Exposure of internal infrastructure details like server names and workstation addresses may lead to potential security breaches or compliance violations. Regularly clearing RDC history prevents unintended disclosure of remote connection details, strengthening overall IT security posture.

Frequently Asked Questions (FAQs)

1. Does removing RDC history affect saved credentials?

No, removing RDC history only clears the list of previously accessed computers from the Remote Desktop Connection interface. Removing saved credentials can only be done manually from the Windows Credential Manager.

2. Can I recover deleted RDC history?

No, once RDC history is deleted, it cannot be recovered unless you have a backup of the Windows registry from before the deletion. Keeping a manual record of essential remote machines before clearing the history is a good practice if you frequently need to reference past connections.

3. Does clearing RDC history improve performance?

RDC history isn’t resource-heavy. System performance may improve after clearing RDC history, but not significantly since they don’t consume noticeable system resources. However, clearing outdated or incorrect entries can help avoid connection issues, especially if old records contain obsolete IP addresses or incorrect credentials.

4. Can I prevent Windows from storing RDC history in the future?

Yes, you can configure Windows to stop saving RDC history by modifying the system’s Group Policy settings or editing the registry. In the Group Policy Editor, you can disable the storage of Remote Desktop connection history by navigating to Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Connection Client and enabling the Do not allow saving of credentials policy. Additionally, you can automate history clearing with PowerShell scripts or third-party tools to ensure no records are retained.

Keeping Your Remote Connections Secure

Remote Desktop Connection History is a handy tool by Windows if you need to reference previous remote connections for specific purposes. However, since these RDC entries may contain sensitive information, it’s only ideal to clear them regularly to avoid unauthorized access, protect sensitive data, and maintain a secure remote access environment. This article outlines the methods of RDC history removal to help you execute an important security measure to keep your remote connections secure.

Next Steps

Building an efficient and effective IT team requires a centralized solution that acts as your core service deliver tool. NinjaOne enables IT teams to monitor, manage, secure, and support all their devices, wherever they are, without the need for complex on-premises infrastructure.

Learn more about Ninja Endpoint Management, check out a live tour, or start your free trial of the NinjaOne platform.

You might also like

Ready to simplify the hardest parts of IT?
×

See NinjaOne in action!

By submitting this form, I accept NinjaOne's privacy policy.

NinjaOne Terms & Conditions

By clicking the “I Accept” button below, you indicate your acceptance of the following legal terms as well as our Terms of Use:

  • Ownership Rights: NinjaOne owns and will continue to own all right, title, and interest in and to the script (including the copyright). NinjaOne is giving you a limited license to use the script in accordance with these legal terms.
  • Use Limitation: You may only use the script for your legitimate personal or internal business purposes, and you may not share the script with another party.
  • Republication Prohibition: Under no circumstances are you permitted to re-publish the script in any script library belonging to or under the control of any other software provider.
  • Warranty Disclaimer: The script is provided “as is” and “as available”, without warranty of any kind. NinjaOne makes no promise or guarantee that the script will be free from defects or that it will meet your specific needs or expectations.
  • Assumption of Risk: Your use of the script is at your own risk. You acknowledge that there are certain inherent risks in using the script, and you understand and assume each of those risks.
  • Waiver and Release: You will not hold NinjaOne responsible for any adverse or unintended consequences resulting from your use of the script, and you waive any legal or equitable rights or remedies you may have against NinjaOne relating to your use of the script.
  • EULA: If you are a NinjaOne customer, your use of the script is subject to the End User License Agreement applicable to you (EULA).