Wednesday, August 31, 2011

Check HP Entries from Device Manager for Multiple Machines

Create a batch file HPDEV.bat having content,

@echo off
for /f %%C in (ServerName.txt) do (
echo %%C>> HPResult.txt
devcon -m:\\%%C findall * | find /i "hp">> HPResult.txt
devcon -m:\\%%C findall * | find /i "Compaq">> HPResult.txt
devcon -m:\\%%C findall * | find /i "NC7">> HPResult.txt
devcon -m:\\%%C findall * | find /i "Smart">> HPResult.txt
devcon -m:\\%%C findall * | find /i "Proliant">> HPResult.txt
devcon -m:\\%%C hwids *floppy*>> HPResult.txt
)

ServerName.txt contains the list of servers.

Wednesday, August 3, 2011

Stop and Disable HP Services

net stop "Windows Time"
net stop "HP Insight Foundation Agents"
net stop "HP Insight NIC Agent"
net stop "HP Insight Server Agents"
net stop "HP Insight Storage Agents"
net stop "HP Insight Event Notifier"
net stop "HP ProLiant Remote Monitor Service"
net stop "HP ProLiant System Shutdown Service"


sc config W32Time start= disabled
sc config CIMNotify start= disabled
sc config CqMgHost start= disabled
sc config CpqNicMgmt start= disabled
sc config CqMgServ start= disabled
sc config CqMgStor start= disabled
sc config CpqRcmc start= disabled
sc config sysdown start= disabled

Create User Account and Add migration account to administrators group

Create a file ServerName.txt which should contains list of all the server.
#Create User Account and Add migration account to administrators group
for /f %C in (ServerName.txt) do psexec \\%C net user /ADD
for /f %C in (ServerName.txt) do psexec \\%C net localgroup administrators /ADD


#ADD WINS
for /f %C in (ServerName.txt) do psexec \\%C netsh interface ip add wins "Local Area Connection" "X.X.X.X"
for /f %C in (ServerName.txt) do psexec \\%C netsh interface ip add wins "Local Area Connection" "Y.Y.Y.Y" index=2

#STOP and Disabled Windows Time Service

for /f %C in (ServerName.txt) do psexec \\%C net stop "Windows Time"
for /f %C in (ServerName.txt) do psexec \\%C sc config W32Time start= disabled

# Collect IPCONFIG and WINMSD
for /f %C in (ServerName.txt) do psexec \\%C ipconfig /all >>E:\SUBHAG\WINMSD\28JULY2011\%C_ipconfig.txt
for /f %C in (ServerName.txt) do msinfo32 /computer %C /report E:\SUBHAG\WINMSD\28JULY2011\%C_WINMSD.txt

Thanks and Regards,
Subhag Ghosh

How to check windows system uptime?

1. Open cmd, systeminfo,

System Boot Time: 7/22/2011, 10:09:23 AM

2. Check for the following system events in eventvwr,

a) Event ID: 1074 for Shutdown Event

b) Event ID: 6013 for uptime

c) Event ID: 6005 , for system start time

d) Event ID: 6006, for system stop time

Thanks and Regards,
Subhag Ghosh

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