Invoke PowerShell as a Different User



Hey gang,

Does anyone know of a way to Invoke PowerShell as a user other than the user the robot is running as (similar to Run as Different User)?

I need to do some AD and Exchange work with variables created in UiPath. The process works fine if I run in Studio while logged in with an AD admin account but we don’t (and won’t) have a robot running under those credentials.

The only way I can come up with is use Invoke Code to start PowerShell with different credentials (from Orchestrator) and passing it a PS script along with the UiPath variables as arguments. Should work but seems messier than it needs to be.