Monitor Windows Services status Remotely

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)

Capture

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

https://techwizard.cloud

https://syscloudpro.com/

PowerShell Cheat Book

Leave a Reply

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

WordPress.com Logo

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

Google photo

You are commenting using your Google 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