Appcmd script that will monitor IIS app pools and send email if application pools is stopped

自作多情 提交于 2019-12-13 05:03:33

问题


I am looking for a script with appcmd, that will monitor the IIS application pools and we can also get email notifications when some apppools are crashed. We want to put the script as a scheduler task.


回答1:


I suggest you combine the information from these two resources

  1. http://technet.microsoft.com/en-us/library/cc771701(v=ws.10).aspx
  2. http://blogs.msdn.com/b/amb/archive/2012/10/18/how-to-get-an-application-pool-configuration-with-appcmd-exe.aspx

But in summary you can use appcmd to return a list of sites which are not in a state of "started";

e.g.

appcmd list apppool /state:"Stopped"


来源:https://stackoverflow.com/questions/15957485/appcmd-script-that-will-monitor-iis-app-pools-and-send-email-if-application-pool

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!