I have a number of services on a remote machine that I would like to query and return the status of eg.whether they are running or not.
I have a tool called psservice
Standalone, it does the following...
psservice \\computer query browser
C:\>FOR /F i > c:\cunt.txt"
C:\>psservice query browser
PsService v2.21 - Service information and configuration utility
Copyright (C) 2001-2006 Mark Russinovich
Sysinternals - www.sysinternals.com
DISPLAY_NAME: Computer Browser
Maintains an updated list of computers on the network and supplies this list to computers designated as browsers. If this ser
vice is stopped, this list will not be updated or maintained. If this service is disabled, any services that explicitly depen
d on it will fail to start.
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
What I have done is create 2 files.
------------ services.txt (a list of services i want to query)
-------------qs.cmd (the command to run)
FOR /F %i in (services.txt) do "psservice query %i"
The above doesnt seem to work.
Any help greatly appreciated.