I am trying to automate some authentication where I connect via RDP, and authenticate with a particular server, using credentials taken from a PROPERTIES file.
On windows, the built in RDP client is mstsc.exe, but it doesnt seem like you can supply login credentials via command line, like on linux and Mac.
Is there any workaround on Windows, using mstsc.exe, where I can authenticate automatically, without any interaction from the user?
Thanks.
Could you use a custom connection file ? Then pass it into MSTSC E.G:
Here’s what a RDP file looks like, I saved credentials, note the FULL ADDRESS field and the USERNAME field.
pass that to the mstsc.exe call. I’ll try and see where the password is stored.
I wouldn’t call this super secure either. I think the password is stored encrypted, it’ll be a few minutes until I figure out how.
What are you trying to accomplish exactly? MSTSC doesn’t return values based on authentication. So, I’m not sure what you plan on capturing.