Batch Command to tell if a service is running on a server

Archived from groups: microsoft.public.win2000.advanced_server,microsoft.public.win2000.applications,microsoft.public.win2000.developer,microsoft.public.win2000.networking (More info?)

Hi

I am an IT administrator for a financial firm and as part of my job I
have to carry out some pre-production tasks such as checking services
on servers and checking event logs on servers. My first question to
you is

1) Is there a batch file or script I can run to report to me if
certain services are running on a server and if so what is it? and
2) Is there some way I can filter out warnings and errors from event
logs into a text file to save me checking all events on several
servers at once


Many Thanks
2 answers Last reply
More about batch command service running server
  1. Archived from groups: microsoft.public.win2000.advanced_server,microsoft.public.win2000.applications,microsoft.public.win2000.developer,microsoft.public.win2000.networking (More info?)

    "Des" <d_mc_alister@hotmail.com> wrote in message
    news:e73a6d55.0503230046.7a802109@posting.google.com...
    > Hi
    >
    > I am an IT administrator for a financial firm and as part of my job I
    > have to carry out some pre-production tasks such as checking services
    > on servers and checking event logs on servers. My first question to
    > you is
    >
    > 1) Is there a batch file or script I can run to report to me if
    > certain services are running on a server and if so what is it? and
    > 2) Is there some way I can filter out warnings and errors from event
    > logs into a text file to save me checking all events on several
    > servers at once
    >
    >
    > Many Thanks

    1)
    @echo off
    net start | find /i "Terminal Services"
    if %ErrorlLevel%==0 (set TS=yes) else (set TS=no)

    2) You can use a tool such as dumpel.exe (Resource Kit)
    or dumpevt (freely downloadable).
  2. Archived from groups: microsoft.public.win2000.advanced_server,microsoft.public.win2000.applications,microsoft.public.win2000.developer,microsoft.public.win2000.networking (More info?)

    "Pegasus \(MVP\)" <I.can@fly.com> wrote in news:uMDnqa6LFHA.580
    @TK2MSFTNGP15.phx.gbl:

    > "Des" <d_mc_alister@hotmail.com> wrote in message
    > news:e73a6d55.0503230046.7a802109@posting.google.com...
    >> Hi
    >>
    >> I am an IT administrator for a financial firm and as part of my job I
    >> have to carry out some pre-production tasks such as checking services
    >> on servers and checking event logs on servers. My first question to
    >> you is
    >>
    >> 1) Is there a batch file or script I can run to report to me if
    >> certain services are running on a server and if so what is it? and
    >> 2) Is there some way I can filter out warnings and errors from event
    >> logs into a text file to save me checking all events on several
    >> servers at once
    >>
    >>
    >> Many Thanks
    >
    > 1)
    > @echo off
    > net start | find /i "Terminal Services"
    > if %ErrorlLevel%==0 (set TS=yes) else (set TS=no)
    >
    > 2) You can use a tool such as dumpel.exe (Resource Kit)
    > or dumpevt (freely downloadable).
    >
    >

    NET START only tells you about the local machine.
    To query/control services on remote computers,
    you can also get SERVICE from
    http://www.loa.espci.fr/winnt.html
    and PSSERVICE from
    http://www.sysinternals.com/ntw2k/utilities.shtml
    (there are also other tools there in the PSTOOLS that are useful)
    Another site with some similar tools:
    http://wettberg.home.texas.net/freeware.htm
Ask a new question

Read More

Servers Command Prompt Microsoft Windows