Link to home
Start Free TrialLog in
Avatar of mksgct
mksgct

asked on

Script required for reboot the servers

I need to reboot many servers at a time. I'm having the list of servers. Can anyone give the script to reboot the servers using the list of remote servers.
Avatar of kory1006
kory1006
Flag of United States of America image

You can create a batch file using the shutdown command.  Then run the batch file using the task scheduler with admin credentials.

shutdown -f -r -m \\servername1
shutdown -f -r -m \\servername2
shutdown -f -r -m \\servername3
ect...
ASKER CERTIFIED SOLUTION
Avatar of tigermatt
tigermatt
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AmazingTech
AmazingTech

Use psshutdown. www.sysinternals.com

Type the command for a complete list of parameters. You can also set the shutdown reason code.

I think the command should look like this as a minimum.

psshutdown -f -r -t 0 @RemoteServers.txt
Avatar of mksgct

ASKER

Thanks a lot. VB script helped me ..