I am trying to control UIPath Assistant from PowerShell. I want to control a process run by UIPath Assistant using PowerShell .
I managed to successfully get Postman working - thanks to the clear documentation. The technology group would prefer to use PowerShell though. I don’t really understand the syntax so I have been unable to puzzle out the documentation provided -
GitHub - UiPath/orchestrator-powershell: UiPath Orchestrator PowerShell cmdlet library
I got the package installed and can send a Get-UiPathAuth token which returns the correct url, tenant, and says authenticated. However, when I run Get-UiPathProcess - …
From this thread I learn that processes can be controlled from PowerShell
However, I cant connect from PowerShell due to the below error.
Get-UiPathAuthToken : Use -CloudDeployment parameter to connect to UiPath Automation Cloud
Refer attached image, on the commands that I have tried so far. Somehow the parameter for
CloudDeployment seems to be incorrect.
Any clue ? or what other method can I establish session with UIPath Assistant ?
Thank you for your time and suggestions.
(brij mohan sharma)
September 9, 2022, 11:12am
Is API enabled in your orchestrator?
Thanks for your reply.
I think API is activated and I was able to execute the below command. However, it doesn’t get authenticated.
(brij mohan sharma)
September 11, 2022, 3:59pm
Did you checked with Postman as well?
I think in below command you are not passing all required parameter, please check ur command
PS C:>Get-UiPathAuthToken -Session -ClientId <your_client_id> -UserKey <your_user_key>
Thank you both for replying my topic. I think we are talking different method of using Powershell.
I was exploring
UiPath/ library. orchestrator-powershell
I have provided parameter as per the guide. seems like modules might have been updated but not the guide. First 2 example also doesnt work.
---------- EXAMPLE 1 ----------
Get-UiPathAuthToken -URL https://platform.uipath.com -Username <myuser> -Password <mypassword>
Connect to UiPath public platform Orchestrator, using user name and password.
---------- EXAMPLE 2 ----------
Get-UiPathAuthToken -URL https://platform.uipath.com -Username <myuser> -Password <mypassword> -Session
Connect to UiPath public platform Orchestrator, using user name and password and save the token for the current
I will try again, when I get some chance.
Thank you once again.
I stopped exploring using PowerShell. Instead, I was able to achieve using below.
Start-Process -FilePath “C:\ProgramData\Microsoft\Windows\Start Menu\Programs\UiPath\UiPath Assistant.lnk”
$Objshell = New-Object -COMObject wscript.shell; “UI Path Executor Not Running”
$Objshell.Exec(‘C:\Program Files\UiPath\Studio\uiRobot.exe connect --url
UiPath --clientID xxxxxxxx35xxx7bd7xx7 --clientSecret v3xxxx5xxm9xx’);
$Objshell.Exec(‘C:\Program Files\UiPath\Studio\uirobot.exe execute --process TasteBud.Order.Processing_v2’);
September 19, 2022, 3:12pm
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.