Skip to content

Instantly share code, notes, and snippets.

@0xIIDe231
Forked from WindyNova/ClearRDPHistory.bat
Created October 7, 2025 11:03
Show Gist options
  • Select an option

  • Save 0xIIDe231/4a2f866de1d3aef6b1f4a95921be1ec9 to your computer and use it in GitHub Desktop.

Select an option

Save 0xIIDe231/4a2f866de1d3aef6b1f4a95921be1ec9 to your computer and use it in GitHub Desktop.
Clear RDP Connection History Batch
@REM https://www.tachytelic.net/2019/01/clear-rdp-cache/
@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"
del /ah %homepath%\documents\default.rdp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment