PSU Scheduled Script to be able to use Secrets when running under Default

Product: PowerShell Universal
Version: 5.4.4

I have a script that connects to AWS via Credentials stored in PSU Vault. These work perfectly when I run the script via the console, but fail when it is scheduled.

How best could I overcome this?

Did you set any specific role to the credentials variable or to the schedule?
It seems that the context in which your schedule is running cannot access the variable.

PSU Screenshot 1
PSU Screenshot 2

I have attached screenshots to show that I have not assigned any Roles to it and just leaving RunAs blank, which then sets it to Default.

I might have initially created the Variable with a role, I have recreated it and it is now working.

So to be sure it is working as expect, both the Variable and the Scheduled Job need to be setup without any Role assigned to them.

1 Like