Monitor and alert Windows Services status

As Technet Gallery is retiring so moving the code to Git Hub. (click below github download link for this script)

Monitor and alert Windows Services status


This script is extension of below script that can monitor the windows services from remote servers.

Now I have updated it to add a alert if services are not running.

Download and extract the script from above , update alerting parameters.


$alert = “Yes” ###specify NO if you don’t want alerts

$report = “.\report.htm”

$smtphost = “”

$from1 = “”

$to = “”


Define variables to get services and servers data(example is in the download)


$EVServerList = Get-Content “.\EvServer.txt”

$EVServicesList = Get-Content “.\EvServices.txt”
$EVJserverList = Get-Content “.\EvJserver.txt”

$EVJservicesList = Get-Content “.\EvJservices.txt”
$EVDAserverList =  Get-Content “.\EvDAserver.txt”

$EVDAservicesList = Get-Content “.\EvDAservices.txt”


browse to the end of the script and call the function as below

servicestatus $EVServerList $EVServicesList

servicestatus $EVJserverList $EVJservicesList

servicestatus $EVDAserverList $EVDAservicesList


You can schedule the the script to runevery 15 mins or as per your requirements.(don’t for get to remove the pause statement from the batch file)



Tech Wizard

PowerShell Cheat Book

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s