We have a web app that needs its app pool recycled often and while development addresses the root cause, we'd like to mitigate the impact to the business by automatically recycling the app pool when the site stops responding. I've created useful monitors in SCOM's Web Application Availability Monitoring, but when I try to create a recovery task I'm unable to get it to successfully run on demand or via a recovery task. The command does run fine when ran on the web server.
My best guess is that SCOM is attempting to run the task on the management server, instead of the web server, since that is the location where the URL is monitored from.
Error:
Failed to create process due to error '0x80070002 : The system cannot find the file specified.', this workflow will be unloaded. Command executed: "C:\Windows\System32\IIsApp.vbs" /a Tracker /r Working Directory: C:\Windows\System32\ One or more workflows were affected by this. Workflow name: ConsoleTaskGeneratedByUI24d65019b44d4c4d8738e8e229aa54a9 Instance name: trkr-web05 [TPAWNSCOM003.domain.com] Instance ID: {765099B8-8507-A0B3-9FE3-810FE8D409ED} Management group: SCOM Error Code: -2130771918 (Unknown error (0x80ff0032)).