Could anyone please help me understand how UiPath handles a pre-defined (and potentially even bypassed) execution policy? Let’s start with the error message:
Now, there are several topics like this covering the root cause. I did change the execution policy, and according to this article this affects anyone using the machine. Note that John isn’t an Administrator, and the policy is set to RemoteSigned (which I had selected earlier by using Set-ExecutionPolicy with elevated permissions):
However, when running Get-ExecutionPolicy in UiPath, I would get back the set default (i.e. restricted). It’s the same for a normal user, and for someone running Studio with elevated permissions:
Naturally, I can set the execution policy in Studio as well - and here is where things get fuzzy. When using Set-ExecutionPolicy in Studio, my user seems to be unaffected. I can set it to unrestricted, but Get-ExecutionPolicy in PowerShell would still show up as RemoteSigned. This setting persists, even across Studio, Session and Server restarts.
So, here’s what I’d like to understand:
- Why wouldn’t UiPath be affected by me changing the execution policy for the entire machine?
- Why is the policy different in Studio than in Windows, even when working with the same user?
- What are best practices when rolling out packages?