1

I am currently working on automation using python pytest framework.

I used pywinauto and Auto IT to login to rdp using python script. I am able to login to rdp but after that I am unable to perform operations such as opening and running powershell commands, editing some json files, launching of browser using Selenium web driver inside the remote desktop and switching and controlling the program execution in multiple VMs.

I tried using the Paramiko, rpc, wmi and a few other approaches but I am unable to establish the connection. Could anyone please let me know the way to do it using python.

Pywinauto and auto it tool: able to launch mstsc using this and login to rdp but unable to do anything after logging in.

Paramiko: Imported Paramiko module and ran after passing host ip, username and password but it is unable to establish connection.

Wmi: Same as Paramiko

Please let me know if more information is reqd.

  • once you're in RDP, you need to automate using the RDP client. Maybe check here?: https://powerautomate.microsoft.com/en-us/blog/automate-microsoft-remote-desktop-with-the-may-2020-update-to-ui-flows-in-power-automate/ – pcalkins Mar 07 '23 at 19:30
  • On second thought wouldn't it be easier to just setup a remote grid/node on that machine? – pcalkins Mar 07 '23 at 19:33

0 Answers0