Appcmd脚本,它将监视IIS应用程序池,并在停止应用程序池时发送电子邮件 [英] Appcmd script that will monitor IIS app pools and send email if application pools is stopped

查看:88
本文介绍了Appcmd脚本,它将监视IIS应用程序池,并在停止应用程序池时发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个带有appcmd的脚本,该脚本将监视IIS应用程序池,并且当某些应用程序池崩溃时,我们还可以获得电子邮件通知.我们希望将脚本作为调度程序任务.

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.

推荐答案

我建议您合并这两种资源中的信息

I suggest you combine the information from these two resources

  1. http://technet.microsoft.com/en-us/library/cc771701(v=ws.10).aspx
  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

但是总之,您可以使用appcmd返回未处于已启动"状态的站点列表;

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

例如

appcmd list apppool /state:"Stopped"

这篇关于Appcmd脚本,它将监视IIS应用程序池,并在停止应用程序池时发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆