Re: service state across servers

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi

Try this out..may be need to do it in a loop for multiple computers

Set objComputer = GetObject("WinNT://winxp,computer")
Set objService = objCOmputer.GetObject("service", "Bonjour Service")
Select Case objService.Status
Case 1
wscript.echo "stopped"
Case 2
wscript.echo "start pending"
Case 3
wscript.echo "stop pending"
Case 4
wscript.echo "running"
Case 5
wscript.echo "continue_poending"
Case 6
wscript.echo "pause_pending"
Case 7
wscript.echo "paused"
Case 8
wscript.echo "Error"
End Select

rgds
Babu
balta expressed precisely :
Suppose that a service is installed on various servers and I want to be able to check, at any time, on which servers it is running an don which it is stopped.
Is there a script that allows me to achieve that?
The script in question is the monitoring tool Radar and it runs on 26 servers, so such a script would be of tremendous help.
I am new to Windows scripting so any feedback or starting point would be welcome

Thanks!


.



Relevant Pages

  • Re: Simple text parsing gets difficult when line continues to next line
    ... I have a simple script to parse a text file ... state = PENDING ... buff += line ... for line in cleanlines: ...
    (comp.lang.python)
  • RE: Restart Pending
    ... script it you can use WMI to check for the existence of ... Wscript.Echo "No Pending Reboot" ... Has anyone come up with a WMI query that determines if a system has a ... pending restart waiting in the wings, following Windows Update? ...
    (microsoft.public.windows.server.scripting)
  • Re: How to know if read is pending on pipe
    ... > programs may use stdin and stdout to interface with the operator. ... this seems to be a case for using the pipe mechanism. ... > there is no read pending. ... I cannot predict when and if the script wants ...
    (comp.unix.aix)
  • Re: Deny rules...
    ... services client I have not implemented it. ... Tony Su ... >The Script makes sure the ip to be blocked is not itīs ... >I have few outside servers to connect from to my servers ...
    (microsoft.public.isa)
  • Re: Software configuration management tool required
    ... If it automates ... and 100-ish servers, it's just not going to happen. ... you test it by running the rc?.d script that init will ... > because Oracle or some vendor tells them to do so. ...
    (comp.unix.admin)