Batch script to know windows service status

Hi, 

we have a oracle connector server running as a service on windows server. I would like to know 

1) status of the windows service, if it's running or stopped

2) send notification of the status to email or any other form. 

Could you please help me how to do this

Thanks


  • Edited by Suren424 2 hours 15 minutes ago
August 26th, 2015 12:54am

I got this and working fine ... but how can i write the same if the service is running on a remote server and how to send notification if it's not running ?

@Echo Off
sc query AudioSrv | find "RUNNING" >nul 2>&1 && echo service is runnung
sc query AudioSrv| find "RUNNING" >nul 2>&1 || echo service is not runnung

any help would be appreciated 

Thanks


  • Edited by Suren424 1 hour 16 minutes ago
Free Windows Admin Tool Kit Click here and download it now
August 26th, 2015 1:53am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics