HowTo: Remove broken tasks from the task scheduler - Windows 7

Sometimes you get a message when you open Task Scheduler saying "Task ... has an error" (possibly mentioning "wrong user") - but the most annoying thing is that the offending task is nowhere to be found inside the Task Scheduler!
So this is how to remove the offending task so that the error goes away:
(Make sure you backup your system and create a system restore point before doing this)
  1. Open the Task Scheduler and click OK to any error messages.
  2. In the left hand sidebar, click on Task Scheduler Library.
  3. Then click the little arrow to its left and continue to expand the folders of tasks and click through them one by one until the error message appears again.
  4. Remember which folder it is in, or if it doesn't appear just remember the name of the task that's causing the error.
  5. Close Task Scheduler
  6. Open the folder C:\Windows\System32\Tasks and look around until you find the task.
    • If you created it yourself it's probably in this Tasks folder
    • If you found it somewhere in the folder tree in Task Scheduler, you need to go into the corresponding sub-folder in order to locate it.
  7. Cut-and-paste the offending file into somewhere safe like Desktop or My Documents in case you want to save the information in it. If not then just delete the file.
  8. Re-open task scheduler and the error message should have gone
Now if you want to recreate the task you will have to do it manually by double-clicking on the file and telling Windows to open it with Notepad. Then you can view the task information with which to rebuild the task.