Service account

Hi everyone,

I’ve been setting up a PowerShell Universal server which runs pretty well for most of the things.

I have two service accounts :

  1. “Default service account” which runs PowerShell Universal service and is the default for script execution
  2. “Applicative service account” which runs some PowerShell script from “automation/script” menu

However, for one of my scripts, I want to be able to use a file as an argument and to execute the script as another user than the default service account running it : I want to run it using “applicative service account”.

Issue is, the file location for the file seems to be hardcoded to run on the default service account, and I get directly the following error when I try to launch the script with the “Applicative service account” :

"[error] Could not find file ‘C:\Users\myServiceAppAccount\AppData\Local\Temp\psufile.15.bin’. "

This error is triggered only by the fact I have the [File]$File in my parameters.

Runs well though if I execute it with the “Default service account”.

Did someone experience the same issue or would able to provide a solution for that ?

I’m currently running on 4.2.13 version.

Thanks !

1 Like