Open KeePass and go to Tools / Options
Open the Integration tab
Click on URL Overrides
Click on Add.
Type rdp in the Scheme box
Copy and paste the following command in the URL Override box.
cmd://cmd /c “cmdkey /generic:TERMSRV/{URL:RMVSCM} /user:{USERNAME} /pass:{PASSWORD} && start /b mstsc /v:{URL:RMVSCM} && timeout /t 3 /nobreak && cmdkey /delete:TERMSRV/{URL:RMVSCM}”
(Copy and paste this into a plain text editor like e.g Notepad. Then replace the quotation marks with new ones. Then copy that line into KeePass. WordPress replaces the quotation marks with non-standard ones and the command will not work if this is not done!)
Done!