当Windows服务停止发送电子邮件警报时,任何人都知道vbs脚本 [英] any one knows vbs script for when windows services is stopped to send a email alerts

查看:86
本文介绍了当Windows服务停止发送电子邮件警报时,任何人都知道vbs脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用下面的脚本,但不工作



im using below script, but not working

Set objEmail = CreateObject("CDO.Message")
objEmail.From = "mail id"
objEmail.To = "mail id"
objEmail.Subject = "Service Is Down"
objEmail.Textbody = "The Service ### has stopped."
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
"smtp.Gmail.com"
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 143
objEmail.Configuration.Fields.Update
objEmail.Send

推荐答案

试试这些链接 -

检查服务状态,如果停止则重新启动,电子邮件结果 [ ^ ]

使用VBScript监控Windows服务 [ ^ ]
Try these links -
Check Service Status, restart if stopped, email results[^]
Monitoring windows services with VBScript[^]


这篇关于当Windows服务停止发送电子邮件警报时,任何人都知道vbs脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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