@Echo off
Set SERVER=10.40.61.101
Set USERNAME=Administrator
Set PASSWORD=Marvin2008
Cmdkey /generic:TERMSRV/%SERVER% /user:%USERNAME% /pass:%PASSWORD%
Start mstsc /v:%SERVER%
Timeout 1
Cmdkey /delete:TERMSRV/%SERVER%
转载于:https://www.cnblogs.com/marvin1213/p/10558122.html