ps script to check service stopped or running, i stopped that service send a email to email address
then run serviceMonitor.ps1
Make sure to enable less secure apps to google mails if you using gmail
Please change the $serviceName = "ServiceName" to your service need to monitor Please change the $sendemailaddress to Sender's mail address Please change the $destemailaddress to Receiver's mail address Here I am using gmail to smtp host. You can change whatever you want