You can save a connection as a .RDP file, which is just plain-text. You can then use that to launch a connection. Once you're in though, it's all surface-automation from there on in. SendKeys won't work properly, so you might have to leverage something like AutoHotKey if you want to send any keystrokes.
------------------------------
Ami Barrett
Lead RPA Software Developer
Solai & Cameron
Richardson, TX
------------------------------