Hey Community,
I am working on 2 scripts that will disconnect and connect unattended bots to Orchestator while I do some maintenance on the VMs of where the bots live. I currently have a script of connecting the bots but whenever I execute it, instead of automatically connecting, it pops up with the Orchestator Settings with UiPath to type in the Orchestator URL and Machine Key. Is this a bug or is there something that I am missing? Below is the template for the connect script:
Blockquote
Powershell
$LogFile = “Log Location”
$Orchestator = “Orchestator URL”
$VMs = {
“VM Name” = “Machine Key”}
$VMs.GetEnumerator() | ForEach-Object {
$VMName = $.Key
$MachineKey = $ .Value
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
}
