Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Pass Server Info and find service existed or not

$
0
0

Hi All,

        I have written batch code which is running fine to find weather service is existed or not.But I want to pass parameter which holds server name and find weather the service is existed or not .Can any one help me how can i do it    

@echo off

net start | find "SQL Server Analysis Services (MSSQLSERVER)" > nul 2>&1
if %ERRORLEVEL%==0 echo "MS SQLServer Analysis Service running"

if %ERRORLEVEL%==1 echo "MS SQLServer Analysis Service not running"
Pause


Samar


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>