I am unable to Login to Orchestrator CE via powershell command.
As mentioned in this thread , I am using the above command. But I am not able to login. I am getting below error.
Sudden thing that i notice is that it used to work fine till yesterday but from today I am getting this error consistently. Is something changed in Orchestrator CE ?
Typically an error like that indicates that some cmdlet loads an older version of Newtonsoft.Json into the powershell process before the UiPath cmdlet runs. Did you make any change in your scripts, load some other library?
I have made no changes at all to the script. Also to my surprise the same script is running today. But I definitely need to figure out what could be the reason behind this. So I was thinking of the changes that I did and noting them as under. Please point out if these factors could be responsible or not for this behavior.
I am running a standalone powershell script that firsts installs uipath.powershell module if not present and then creates many assets. The strip down generalized version would be as below.
installation of UIPath powershell…
Install-PackageProvider -Name NuGet -Force
register uipath repository
$uipathrepository = Get-PSRepository -Name “UiPath”
Register-PSRepository -Name UiPath -SourceLocation https://www.myget.org/F/uipath-dev/api/v2
install uipath powershell module
$uipathmodule = Get-Module -Name “UiPath.Powershell”
Install-Module -Repository UiPath -Name UiPath.Powershell -Force
connect to orchestrator in case of public cloud orchestrator
Add-UiPathAsset GlobalAsset -IntValue 1
Here when i try to connect to orchestrator, window to ask for credentials popped up but now it does not, so does it pick username and password from chrome’s saved passwords ? If yes then, yesterday i did clear my browsing history and cache.
I did restart my machine today and it seems to run smoothly.
The gist of the issue is that your PowerShell session is the problem, not the script. If you have a session open today and run some cmdlet that loads the old library, leave the session open, come back tomorrow and run the script, it will fail.
Simply recycling the PowerShell session (close the window) should fix the problem
Yup you are right may be it was power-shell session that was causing issue. Thanks a lot for your help
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.