I am attempting to run a script in PowerShell Universal 1.3.0 as a different user. I entered a PSCredential secret variable, using the form DOMAIN\username for the user. I gave this user “Log on as a Batch Job” rights. (I also tried making it an admin on the server running PoshU - same result.) I also verified the password is correct.
The error I receive is: Error executing job: A required privilege is not held by the client.
PoshU is running under a dedicated service account, which is also an Administrator on the server.
My apologies, I did read that page of the docs but misinterpreted it. I thought it was sufficient that my service account was a local Admin on the server. However, once I gave the account running PSU the three rights listed, it started working. Thanks for your help!
I have a similar problem. PS Universal (3.8.12) runs in IIS, without a service account (nt authority\system). Run as different user brings the error:
[error] The ‘Out-PSUPipeline’ command was found in the module ‘Universal’, but the module could not be loaded. For more information, run ‘Import-Module Universal’.
We just run a simple Whoami in script, credentials are stored in BuiltInLocalVault
User has the privilege run as batch job and local admin permission.