Yesterday I had an issue at one of my clients with a server which was unable to check the task scheduler eventlog.
The operations log was packed with different alerts but mostly with the infamous id 21406 which in fact can mean a lot of things.
The exact message: VBScript runtime error: File name or class name not found during Automation operation: "oAPI.CreateTypePropertyBag”
My standard course of action did not solve the issue:
Again these steps did not solve the issue the Events kept coming in.
Eventually I started to dig deeper and started to register the differtent dll’s again on the machine and apparently registering the MOMScriptAPI.dll solved the issue.
Probably a bad registration / link during install or upgrade caused the issue.
Hope this helps someone out there in saving his valuable troubleshooting time 🙂