Wednesday, August 3, 2011

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

No comments:

Post a Comment