Multiple RDP Connections from Bot Machine

I am trying to login to multiple RDP machines from the Bot machine. For example, I have 5 RDP machines, the bot needs to connect to 5 machines one after the other. The bot is able to connect to the first machine but for second machine it fails. It’s not able to find selectors in the RDP window.

Can anyone please help me with how I can achieve the above?

Please provide more details with the steps you are taking to provide clarity

  • How are you launching the connections?
  • What application are you using to make the RDP connection?
  • Screenshots, sequence of activities, etc.
1 Like

HI,

I am using the windows system “mstsc” command to open the RDP connection window.
Attached sequence being used to enter details in rdp window. I am running this sequence in a l

Login.xaml (21.5 KB) oop.

In this example, I only see one connection being made. I do see where you type the password, you have this selector

<ctrl automationid='PasswordField_2' />
<ctrl automationid='PlaceholderTextContentPresenter' />

where does the second part of the selector come from? When I inspect my prompt window the following is sufficient for me.

<ctrl automationid='PasswordField_2' />

If this is not your issue, where does the sequence error out and what is the error?

Also to simplify your sequence, have you considered passing the arguments to the mstsc?
e.g. mstsc /v:fqdn:3389

Could also consider saving the credential temporarily to the Windows Credential Store and you could bypass the prompt window and when you are done destroy the credential.

2 Likes

HI,

Thanks for the help on arguments. Can we also pass in user name to be connected as argument? By default its trying to login via the Administrator user.
The issue is not with the Password Credential box.

Not directly with mstsc. You would need to save your credentials to the credential manager, using the UiPath.Credentials.Activities, manually saving them or using cmdkey or equivalent command (Powershell, etc) of your choice to create the credentials.

Making sure to destroy the credentials afterwards. If you also create it with a local/persistence scope of the session so it is only available to the current session and is destroyed when that session ends.

If the selector is valid for you on the password field… where is your sequence failing and what is the error?

1 Like

Hi Tim,

Actually my sequence was failing in the below window. It was not able to find selector for Computer and User name.

I am now able to connect to multiple vms via the mstsc command with arguments. I am using the Use Different Account click option.

I will try the [UiPath.Credentials.Activities] as well. I havent used them till now and udually fetch credentials from orchestrator. (https://docs.uipath.com/activities/docs/system-credentials)

I will sometimes mix the two… Fetch the credential from Orchestrator, create the credential locally… Do the work required, at the end destroy the local credential.

We use this for both your scenario as well as when we need to authenticate as another domain account temporarily with a remote service.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.