PC Review


Reply
Thread Tools Rate Thread

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

 
 
Des
Guest
Posts: n/a
 
      23rd Mar 2005
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
 
Reply With Quote
 
 
 
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      23rd Mar 2005

"Des" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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).


 
Reply With Quote
 
nospam.please@ualberta.ca
Guest
Posts: n/a
 
      23rd Mar 2005
"Pegasus \(MVP\)" <(E-Mail Removed)> wrote in news:uMDnqa6LFHA.580
@TK2MSFTNGP15.phx.gbl:

> "Des" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Batch command to terminate a running process? NoSpam@aol.com Windows XP General 7 7th May 2005 06:43 PM
Batch Command to tell if a service is running on a server Des Microsoft Windows 2000 Advanced Server 2 23rd Mar 2005 04:12 PM
Batch Command to tell if a service is running on a server Des Microsoft Windows 2000 Networking 3 23rd Mar 2005 04:12 PM
Batch Command to tell if a service is running on a server Des Microsoft Windows 2000 Applications 2 23rd Mar 2005 04:12 PM
Running the at command as an Administrator with log on as batch job rights Sean Microsoft Windows 2000 2 19th Jan 2004 10:13 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:27 AM.