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 - I get an error - You are not authenticated!
What do I need to do to pass the initial authentication on?
Hi @RR2,
Welcome to the Community!
Are we talking here about your our (on-premise) instance of Orchestrator or the Community one? If the answer is Community, then I think this might be blocker here.
Ah, yes I’m trying to build the POC with the community before messing around with our enterprise version. I’m guessing I have to jump right into the enterprise version then?
I think so. Community Orchestrator can have issue with proper authentication through powershell as in typical scenario to be able to “mess” around with powershell the computer to which you are sending commands needs to have scripting allowed from Active Directory or registry side. If Community Edition would have such thing allowed it could be used to other not specially good ways
Point to the enterprise version fixed the authentication issue. I was able to run Get Robot & Process. However, when I try to run Start Job I haven’t been able to figure out the valid input for Process.
I get Cannot convert the X value of System.string to type UiPath.PowerShell.Models.Process.
I’ve tried the process key, ProcessId, and Id with no luck.
Start-UiPathJob -All
cmdlet Start-UiPathJob at command pipeline position 1
Supply values for the following parameters:
Process:
Hello @RR2 sorry I missed the earlier notification.
You should start by first authenticating your PowerShell session with your Orchestrator. For Platform, just run this: PS:>Get-UiPathAuthtoken -Session
Next, you will need a reference to the Process you want to start. Use Get-UiPathProcess to list all processes. Then find the one you want to start and use the process name to get a reference and assign it to a PowerShell variable. In my case, the process name is QueueHandler_RERUSANU: PS:>$process = Get-UiPathProcess -Name QueueHandler_RERUSANU
Now simply start the job: PS:>Start-UiPathJob -RobotCount 1 -Process $process
That helped me zero in on the issue. When I try to use AD/SSO, it doesn’t appear to actually connect. When I use an actual name and password setup via Orchestrator it does.
Yes, if you have a private Orchestrator then you use the syntax you provided (-Url -TenantName -WindowsCredentials, or -Url ... -UserName ... -Password ...). The syntax in my example is for the public Cloud Orchestrator.
-TenantName and -WindowsCredentials were reported previously that don’t work together, Get-UiPathAuthToken with windows credentials and tenant · Issue #59 · UiPath/orchestrator-powershell · GitHub. It’s a bug and needs to be fixed.
When you use -WindowsCredentials there is no actual authentication that occurs, the auth will happen on the next cmdlet that you run. This is why you gte the error on the next Get-UiPathProcess cmdlet, I know is confusing and we have on the roadmap to make it somehow better.