As Technet Gallery is retiring so moving the code to Git Hub. (click below github download link for this script)
Monitor Windows Services status Remotely
Hi Readers,
Sharing a very useful script that can be used with windows servers for daily check list, after maintenance and other activities.
This script will remotely check the service status of sevices that you want to verify if they are running or stopped and report back in
HTML table format as below :-(stopped services are displayed in Red)
example for defining variables–
############################Define Server & Services Variable ###############
$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”
#############################Define other variables##########################
$report = “.\report.htm”
$smtphost = “smtp server”
$from = “ServiceStatus@labtest.com”
$to = “vikas.sukhija@labtest.com”
####################################################################
############################################Call Function#########################################
servicestatus $EVServerList $EVServicesList
servicestatus $EVJserverList $EVJservicesList
servicestatus $EVDAserverList $EVDAservicesList
##############################################################################################
download & extract the zip file for script & example..
you can use this for n number of server/services to be monitored remotely, this can also be scheduled.
Just define server/services as text file as shown in attached zip and then define variables inside attached shell script.
In the end, double click the bat file after that to get the magic in your email.
Tech Wizard