Hi,
You mentioned that this task works fine on cloud (via RDP) and local manually, and has Administrator permission, i think this problem should be Task Scheduler issue, does your task scheduler "run with highest privileges" property is checked? Or you
can find more exception about this error in Windows Event logs in VM via RDP.
The error code 0x80004005, i find most similar error occured by "Can not find the file or assembly", could you make sure that your files or assemblies path is correct in VM?
Another workaround for this issue is that try to use other ways to start your process to see if has the same exception, for example, use Windows Service or background thread to start the process every 5 mins.
Hope this helps.
Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact
msdnmg@microsoft.com
Microsoft One Code Framework