这里提供一串清除mstsc远程登录记录的命令

@echo off

set TMP1=%cd%
echo %TMP1%
reg delete "HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default" /f
reg query "HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Servers" > %TMP1%\tmp.log
for /f "tokens=*" %%i in (%TMP1%\tmp.log) do (
rem echo %%i
reg delete "%%i" /f
)
del /F %TMP1%\tmp.log
pause

复制以上命令,放到bat文件中,双击运行即可

05-11 11:05