TestExecute 12 'dotNET' is undefined using windows task scheduler
I have a powershell script that runs testexecute which works fine when I run the script from the powershell command line. I'm trying to have the same script run from a windows task scheduler task. The powershell script runs but doesn't run like it does when running from the command line. /ErrorLog output shows 'dotNET' is undefined and tcHostingProcess.exe process crashed messages.
I saw a few posts about this but they were older for TC8 and TC9. The solutions for those were to uninstall and reinstall TC which I have tried but for TE12. I have dotNET 4.7.1 installed and TE shows the .NET Classes Support plug-in installed and enabled. I haven't seen much else about task scheduler and TE. I haven't used TE much, any ideas or places to debug further?
I have UAC disabled on the machine. I also have the task set to run as a domain administrator and checked the box to run with highest privileges. I will look to see if there is something else that may be privilege related that is causing issues but I have my doubts about that.
Edit: It appears something got messed up with the user profile of the administrator account I was trying to use for the task and windows was creating temp profiles for the task to use. There were messages about this in event viewer I had missed. This was causing the main issues. Switched the task to run as a different administrator account and it appears to be working now. Thanks!