I wrote a PowerShell script that check the executable in the < action > tag for each task in the Task directory and mark the < enabled >TRUEorFALSE< / enabled > tag as false/true depending on the validity of the digital signature of the executable. After reading each task, the script re-saves the task file with the same name, type and location.
Now my issue is that I get this message when I lunch task scheduler:
“Task XYZ: The task image is corrupt or has been tampered with.”
This message appears for all the tasks that were scanned and saved.
Does editing task’s xml file directly corrupt the task? Is there any task decency that may cause this error(ex: registry value)?