Product: PowerShell Universal Version: 2.3.0
I followed the notes in the ticket below in attempts to execute a script with the specified set of credentials that are stored as a secret variable, but the script is still being executed with the account that is running the PowerShell Universal Windows server (listed under “logon as”) instead of the referenced credentials. The job status displays "run manually by “ServiceAccount” in the Integrated environment as “userAccountName” and the output results of the script show “ServiceAccount” as the user actually executing the script.
I’m trying the following (the users credentials is stored as a secret variable):
$Creds = Get-UAVariable -Name $User Invoke-UAScript -Script Script1.ps1 -Credential $Creds
What piece am I missing to force the script to run with the user’s credentials instead of the service account?