top of page
Writer's pictureTabrez Ajaz

How to clear Remote Desktop Connection (RDP) History?

Hello Readers,

As today’s world where every organisation either small or big are concern about their data or services so they were using different servers either buying from any cloud platform or maintaining their own for their different projects. As many people working on these organization so for accessing these servers a successful connection should be made. For accessing these servers users/developers using Remote Desktop Connection.

If you ever accessed these remote servers ever then you must noticed this already the RDP client stores the connection details for that server or machine that you have connected previously. This is often very useful, but if you are on a public domain or using public machine, it can expose sensitive connection/security details.

By default Remote Desktop Client does not give any way to clear or remove the cached connection histories.

Figure 1: Remote Desktop Connection

If you really want to clear these histories, so other who is accessing your machine don’t know the IP’s or servers that you accessed using RDP, then you can follow any approach to clear your RDP Cache History as mentioned below:

  1. Visual Approach – Using Registry Editor

  2. Command Line Approach – Fastest Way

Visual Approach – Using Registry Editor

1. Open run and type regedit.exe and click OK to open Registry Editor

Figure 2: Open Run and type regedit.exe to open Registry

2. Navigate to: HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client

3. There may be 2-3 registry keys here may available but you need to focus on below registry keys:

  1. Default — It contains the history of the last 10 RDP connections.

  2. Servers — It contains all the RDP connections that have been ever made from the machine

Figure 3: Remote Desktop Connection – Registry Keys

4. Expand the Default Key which contains the most 10 recent connection made from the machine. You can delete all the entries or the one which you only want to remove.

Figure 4: Recent 10 connections information

5. Select the entries that you want to remove then right click and select Delete then click on OK

Figure 5: Select Connection Entries by Pressing Shift select a range or use CTRL to select multiple entries after selecting, Right Click on any selected entry and choose Delete then OK

6. Let’s expand the Servers registry key, this key folder contains all the RDP connections detail along with it’s username for which the connection made from the machine. In Server key folder you may see many entries, rather then delete one by one you can delete the Servers registry key folder itself and then recreate it, but I recommend Command Line way for removing all the entries.

Figure 6: Delete RDP Connection Entry from Servers registry folder

7. After deleting all connections you have to delete default.rdp file that can be found in your current user documents folder.

Figure 7: Delete default.rdp file from Documents folder

Command Line Approach – Fastest Way

1. Open Command Prompt

Figure 8: Open Command Prompt

2. Run below cmdlets [just copy given cmdlets and paste in the command prompt]

reg delete "HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default" /va /f
reg delete "HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Servers" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Servers"
cd Documents
del /ah default.rdp 

Figure 9: Delete all available connections in Default and Servers registry and also delete Default.rdp file

I hope you found the working solution in this article, and understand what are the different approach you can use to remove/clear your Remote Desktop Connection history.

Don’t forget to Like this post and follow our site, so you can get the latest content.

From below Podcast Player you can also listen this complete article. https://anchor.fm/tabrez-ajaz/episodes/How-to-clear-Remote-Desktop-Connection-RDP-History-e131oq7

139 views0 comments

Comments


bottom of page