Dynamically Switch In VDI Farm Using ConnectionString

How to automatically provide the Robot connection string to VDI installations, through GPO?

How to use UiPath on an existing VDI farm?


  1. An image is used to create all (Dev, UAT, Prod) VDIs
  2. UiPath is installed with parameter "ConnectionString" pointing to dev environment
  3. On Production VDIs, config file is updated to "C:\ProgramData\UiPath\UiPath.settings" (before Windows boots up) to point to Production Orchestrator. This is the basic Group Policy Object(GPO) policy.

When GPO is updated as below, the config file successfully changes (see during_GPO_update.png)

But less than a minute after updating the GPO, file is restored to original Connection String and does not retain the newly set GPO.(See Below) .

Resolution: The connection string should be enough in order to trigger the connection to Orchestrator, whenever the UiPath Robot service is restarted. The local policy prevents writing directly to the file in ProgramData folder.

The recommended practice would be to change this connection string by running the below script, with the following command, on the machine:

  • Uirobot connect --connectionString

This command execution shall ensure that the connection string is updated by the Robot service.

  1. Create a powershell script with the command line arguments in which the connection string parameter values is provided.
  2. This powershell script would need to be ran after UiPath Studio/ Robot installation is finished.