Asked by:
Need a script for Monitoring the service with an email alert

Question
-
Hello guys is they any script for Monitoring an application and the service?
I would like to get an email alert when its failed/stopped working and I also wanted to know how its failed (who's login/is it stopped automatically or manually.
A reply will be appreciated......!
Thanks in advance
Arvind Chormalle
- Moved by Bill_Stewart Wednesday, May 30, 2018 6:31 PM This is not "scripts on demand"
Thursday, March 22, 2018 4:07 PM
All replies
-
Hi,
Please find the link which may be of helpful.
https://gallery.technet.microsoft.com/scriptcenter/Check-for-hung-or-stopped-67bc718d
Thanks
Dont forget to mark as Answered if you found this post helpful.
Thursday, March 22, 2018 4:11 PM -
How can i specify my service in that script or it will monitor all the services? because I want monitor specific Application and a service.Thursday, March 22, 2018 4:15 PM
-
Hi
Do the application have a services associated with it? then you can just use as below.
Get-Service -Name "application Name" | out-string
Send-MailMessage -To xyz@contoso.com -From xyz@contoso.com -SmtpServer ex1.contoso.com -Subject "Service Status " -body ((Get-Service -Name "application Name") | out-string)
Thanks
Syed.
Dont forget to mark as Answered if you found this post helpful.
Thursday, March 22, 2018 4:24 PM -
No the Application is different and the service is different.Thursday, March 22, 2018 4:30 PM
-
Hi,
Please find the link may be of helpful.
Thanks
Dont forget to mark as Answered if you found this post helpful.
Thursday, March 22, 2018 4:43 PM -
Please carefully review the following links to set your expectation for posting in technical forums.
This Forum is for Scripting Question Rather than script requests
From a Bill Stewart summary of useful forum links:
- Posting guidelines
- Handy tips for posting to this forum
- How to ask questions in a technical forum
- Rubber duck problem solving
- How to write a bad forum post
- Help Vampires: A Spotter's Guide
- This forum is for scripting questions rather than script requests
\_(ツ)_/
- Proposed as answer by The Grim Thursday, March 22, 2018 9:20 PM
Thursday, March 22, 2018 9:16 PM