Tuesday, August 2, 2011

How to find status of HP related services from a Server List

1. Create a file ServerList.txt contaning server names.

2. Create a batch file name scq.bat with the follwing content,

@echo off
for /f %%C in (ServerName.txt) do (
echo %%C
sc \\%%C query type= service state= all | find "hp" /I
)

3. Open Command Prompt, type SCQ.bat > HPServiceStatus.txt

4. The file HPServiceStatus.txt will contain the list of HP services.

Sample O/P:

ServerName
DISPLAY_NAME: HP Insight Event Notifier
DISPLAY_NAME: HP Insight NIC Agents
DISPLAY_NAME: HP Version Control Agent
DISPLAY_NAME: HP Insight Foundation Agents
DISPLAY_NAME: HP Insight Server Agents
DISPLAY_NAME: HP Insight Storage Agents
DISPLAY_NAME: HP ServiceEmulation

Thanks and Regards,
Subhag Ghosh

No comments:

Post a Comment