Connecting and Disconnecting Robots Via UiRobot.exe

Hey Community,

I am currently running an unattended bot farm and was wondering if there is a way to connect/disconnect all the bots at once while I do system updates to those VMs where the bots live.

I found that there is a program called UiRobot.exe that I will be able to connect and disconnect a bot via command line inside that VM but was wondering if there is a way to remotely execute those commands on my primary computer, so I don’t have to connect to each VM individually. I have a list of scripts I already run for my systems and don’t want to log into Orchestator and manually disconnect them and connect them.


Refer this doc for more details

To answer you query

Yes, there is a way to remotely connect/disconnect all of your unattended bots in UiPath while you do system updates to the VMs where the bots live. You can do this by using the UiRobot.exe command-line tool.

To remotely execute the UiRobot.exe command-line tool on your primary computer, you can use a remote execution tool such as PowerShell or SSH.

For example, if you are using PowerShell, you can use the following command to remotely connect/disconnect all of your unattended bots:

PowerShellInvoke-Command -ComputerName <VM name> -ScriptBlock { UiRobot.exe -connect / -disconnect }

You can also use a PowerShell script to automate the process of connecting/disconnecting all of your unattended bots. For example, the following script will connect/disconnect all of the unattended bots on the VMs in a list of VM names:

PowerShell$VMNames = "VM1", "VM2", "VM3"

foreach ($VMName in $VMNames) {
    Invoke-Command -ComputerName $VMName -ScriptBlock { UiRobot.exe -connect / -disconnect }

You can also use a similar approach to remotely connect/disconnect all of your unattended bots using SSH.

Once you have connected/disconnected all of your unattended bots, you can perform your system updates on the VMs. Once the system updates are complete, you can reconnect your unattended bots.

Hope this helps

Let us know for further clarification

cheers @kadenfrazier


Instead you can try disabling from orchestrator and retain the connectiosn as is for maintainance


Hey Palaniyappan,

Thank you for that for each loop recommendation. I went ahead and added some additional logic to that code you provide but running into another issue. It looks like when I provide the Orchestator URL and Machine Key in the command line, it pops up with the Orchestator Settings box to input that information rather than automatically connecting. Have you had this issue or have any recommendations to get around this? Below is a general structure of the code

$Orchestator = “Orchestator URL”
$VMs = {
“VM Name” = “Machine Key”}
$VMs.GetEnumerator() | ForEach-Object {
$VMName = $.Key
$MachineKey = $
Invoke-Command -ComputerName $VMName -ScriptBlock {
& “C:\Program Files (x86)\UiPath\Studio\UiRobot.exe” -connect -url $Orchestator -key $MachineKey }
“The VMs have been reconnected to Orchestator.” >> $LogFile

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