Delete saved RDP credentials from Windows 10 Credentials Manager, using cmdkey

Date posted: 2021-04-16
Last updated: 2026-05-13

If you want to quickly delete all saved Remote Desktop credentials from your Windows 10 Credentials Manager, here...

If you want to quickly delete all saved Remote Desktop credentials from your Windows 10 Credentials Manager, here is how. Execute the following command in an elevated cmd.exe command-line.

For /F "tokens=1,2 delims= " %G in ('cmdkey /list ^| findstr "target=TERMSRV"') do cmdkey /delete %H

I write these posts in my spare time, based on real problems from my day job as a sysadmin. If this one saved you some debugging time, a small donation is much appreciated. Thanks! šŸ™

Leave a Comment