Take a look at the lead-in graphic. It shows the start menu entries that appear when I enter “rem” to fire off the Remote Desktop Connection app (mstsc.exe). Most of the items that appear therein are current and correct, but some are not (two of the machine names, and all of the IP-based connections). That led me to ask Copilot to lead me though remote connection cache name cleanup. I basically wiped the cache and wound up with this:
Why Do a Remote Connection Name Cache Cleanup?
Short answer: because it points only at useful entries. Longer answer: because I got tired of looking at names for PCs I’d returned to their makers in late 2025 and early 2026. So I decided to ask Copilot to tell me how to clear the stale entries. Boy, howdy, did THAT turn out to be an adventure. Why? Because there are many different things to clean, and many ways to clean them. Here’s a quick recitation of the various steps I took along my path.
Step 1 — Polite Approach: Delete Single Entries
Before you reach for a registry editor or fire up PowerShell, give the built-in method a shot. Open Remote Desktop Connection (mstsc.exe), click the drop-down arrow next to the Computer field, hover over the offending entry, and press the Delete key. Windows will ask you to confirm, you click Yes, and that hostname is gone. Clean, simple, no collateral damage.
Under the hood, all this does is remove a single string value — MRU0, MRU1, or whichever slot held that entry — from HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default. It doesn’t touch your saved credentials, your default connection settings, or anything else. Surgical, even.
Here’s the problem: this works beautifully when you have two or three stale entries. If you’re staring at a list of twenty-plus hostnames and you need to kill most of them, the one-at-a-time approach will age you visibly. There’s no “select all and delete,” no batch operation — just you, your Delete key, and an ever-dwindling reservoir of patience. Time to escalate.
Step 2 — Targeting MRU Registry Keys Directly
Open Registry Editor (regedit.exe, run as your normal user — no elevation needed for HKCU), and navigate to:
HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default
In the right-hand pane you’ll see the MRU entries spelled out plainly: MRU0, MRU1, MRU2, and so on, each containing a hostname or IP string. You can click any entry and hit Delete, or — and here’s where it gets slightly more satisfying — hold Ctrl and click multiple entries to select a batch, then delete the whole lot in one go.
While you’re in the neighborhood, don’t overlook the Servers subkey:
HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Servers
Each child key here is named after a machine you’ve connected to, and it stores credential hints — typically the username Windows offered when you last connected. Deleting a machine’s subkey here removes that saved username data, which matters if you’re handing the machine to someone else or just want a clean security posture.
| ⚠ Caution: Regedit is unforgiving. There is no Undo. Work carefully, and if you’re nervous, export the Terminal Server Client key first (File > Export) so you have a fallback. It takes ten seconds and has saved many an afternoon. |
Registry surgery is great for targeted removal — ripping out specific machines while leaving others intact. But it’s still a manual process, and if your list is long, you’ll find yourself in exactly the same situation as Step 1, just with a slightly scarier interface.
Step 3 — Scripted PowerShell Cleanup
This is where most IT pros should start. Two lines of PowerShell. No GUI fumbling, no click-by-click tedium, and — crucially — repeatable. Drop it in a script, assign it to a shortcut, paste it into a runbook. It doesn’t care how many MRU entries you’ve accumulated.
Open PowerShell (no elevation required — we’re working in HKCU) and run the following:
Remove-ItemProperty -Path “HKCU:\Software\Microsoft\Terminal Server Client\Default” -Name * -ErrorAction SilentlyContinue
Get-ChildItem “HKCU:\Software\Microsoft\Terminal Server Client\Servers” | Remove-Item -Recurse -ErrorAction SilentlyContinue
Here’s what each line actually does:
- Line 1 uses Remove-ItemProperty with the wildcard -Name * to delete every value (every MRU entry) inside the Default key in one shot. The -ErrorAction SilentlyContinue keeps things tidy if the key happens to be empty or the path doesn’t exist yet — no red error text, no drama.
- Line 2 pipes all child keys under Servers through Remove-Item -Recurse, which deletes each per-machine subkey and its contents. Again, SilentlyContinue means it won’t throw a tantrum if the Servers key is already empty.
| 💡 Pro Tip: Note that neither line deletes the Default or Servers keys themselves — it only removes their contents. That means mstsc.exe finds the parent keys intact and doesn’t need to re-create them, which keeps things clean on the filesystem side. |
The PowerShell approach is the sweet spot for most users and administrators: fast, repeatable, easy to verify, and infinitely less error-prone than clicking around regedit under time pressure. Run it once and you’re done. Or add it to an off-boarding script and never think about it again.
Step 4 — Wipe the Terminal Server Client Hive
Sometimes the PowerShell approach still leaves you with artifacts — corrupted entries, unexpected subkeys, or settings that mstsc.exe seems to be reading from somewhere you can’t quite pin down. For those moments, there’s one final escalation: delete the entire Terminal Server Client key wholesale.
In regedit, navigate up one level to HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client, right-click the key, and choose Delete. Or from PowerShell:
Remove-Item -Path “HKCU:\Software\Microsoft\Terminal Server Client” -Recurse -ErrorAction SilentlyContinue
Windows will re-create the entire key structure fresh the next time you launch mstsc.exe. This gives you a genuinely clean slate. Because it got rid of entries whose source I couldn’t identify (but were still producing entries in the Start menu “Recent” list), this is what I decided to do.
| ⚠ Important Warning: This wipes everything — not just the MRU name cache, but also any default settings you’ve configured in the RDP client (default screen resolution, audio settings, drive redirection preferences, and so on). It’s the right call when decommissioning a workstation, preparing a machine for a new user, or resolving a genuinely corrupted configuration. For routine cache cleanup on your own machine, the PowerShell two-liner in Step 3 is the better choice. |
Keeping A Tidy Registry
So there you have it — a clean escalation ladder for taming the RDP name cache, matched to whatever level of mess you’re facing. One or two stale entries? Hit Delete in the client and move on with your life. A sprawling graveyard of defunct hostnames? The PowerShell two-liner clears it in seconds. Truly cursed configuration? Nuke the whole hive and let mstsc.exe start fresh.
Each approach is appropriate to its context, and none of them require third-party tools, elevated privileges, or any particularly heroic effort. The registry isn’t as scary as it looks — as long as you back it up before you go excavating and resist the urge to poke at things you don’t recognize. Keep your tools sharp, your connections list short, and your registry cleaner than you found it. Future-you will be grateful.
What I Did Next, and Where It Took Me
After nuking my name cache completely (option 4) I then remoted into each of the PCs currently on hand here at Chez Tittel. That updated the recents list so it shows ONLY those PCs I might actually remote into. IMO that means “Case closed.” I’m glad it’s over!
Here in Windows-World, the desire to clean up can be overtopped by the difficulties involved. This time, I powered through and got things where I wanted them. I plan to enjoy that while it lasts…


