When using remote desktop, its saved your connection ip / domain name to window registry for your quick access. But sometime you may not want window keep your connection history (e.g. public computers).
Because remote desktop use window registry to save your connection history data. So you may remove the appropriate registry key to archive this.
The following shell command has made for this:
@echo off 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" attrib -s -h %userprofile%\documents\Default.rdp del %userprofile%\documents\Default.rdp del /f /s /q /a %AppData%\Microsoft\Windows\Recent\AutomaticDestinations
### Remote Desktop When using remote desktop, its saved your connection ip / domain name to window registry for your quick access. But sometime you may not want window keep your connection history (e.g. public computers).  ### How to clear connection history Because remote desktop use window registry to save your connection history data. So you may remove the appropriate registry key to archive this. The following shell command has made for this: ```sh @echo off 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" attrib -s -h %userprofile%\documents\Default.rdp del %userprofile%\documents\Default.rdp del /f /s /q /a %AppData%\Microsoft\Windows\Recent\AutomaticDestinations ```