Scheduled Task + Password

Im trying to run a scheduled task with a service account storing the credentials in an encrypted text file as documented in countless guides. I created the file using a service account while logged on to the machine as that service account.

The script executes fine when logged in as that service account. The scheduled task executes fine when manually running it while logged in as that service account. The scheduled task is set to run as the service account and with highest privileges, set not to store the password, and trigger is a time of day.

The issues is that when the task executes without the service account logged in it fails with “ConvertTo-SecureString: The data is invalid” and will ultimately timeout.

Anyone run into this or have any ideas?

submitted by /u/mehpewpew
[link] [comments]

Leave a Reply