Skip to content

Instantly share code, notes, and snippets.

@SunsetMkt
Forked from WindyNova/ClearRDPHistory.bat
Created October 14, 2025 05:13
Show Gist options
  • Select an option

  • Save SunsetMkt/d093c86d426429d567ae19b7833c359a to your computer and use it in GitHub Desktop.

Select an option

Save SunsetMkt/d093c86d426429d567ae19b7833c359a 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