I've got an PS script using invoke-webrequest to obtain data from an API.
The plan is to run the script as an SSIS package and scheduled using SQL agent using a proxy credential (currently using my account).
This is all working under one scenario - I must be logged onto the server via RDP. Under that condition, it all works fine.
However, when I log off from the server and run the agent job - everything appears fine, but the invoke-webrequest doesn't retrieve any data. (I have tried outputting the command using out-file, and i get back a blank file)
I think it's specifically to how the host server handles the invoke-webrequest when the account used isn't interactive - so...has anyone else encountered this and figured how to get it to work while the account isn't logged on?