A batch script to remotely restart about 300 windows server 2003 computers on the network

5 pts.
Tags:
Batch Scripts
Microsoft Windows
Microsoft Windows Server 2003
Windows Server
Windows Server Remote Access
I need a batch script to remotely restart about 300 windows server 2003 computers on  the network using Altris Deployment Server.

Software/Hardware used:
Windows Server 2003

Answer Wiki

Thanks. We'll let you know when a new response is added.

1. Create your list of servers in a text file one per line with no extra spaces or characters.
2. Run the batch file under an ID with administrative access to the servers.

NOTE: This is the bare script to perform the action. You may want to add logging and error checking to the script. Adjust the shutdown command line meet your requirements.

<pre>
@echo off
REM — Parse list of servers
for /f %%a in (path\ServerName.txt) do CALL :RbtMe %%a
goto :DONE

:RbtMe
REM — Restarting remote system.
shutdown -r -t 05 -c “Rebooting for BLAH” -f -m %1
GOTO :EOF

:DONE
</pre>

————————————————————————————————————————
See <a href=”http://www.computerperformance.co.uk/w2k3/shutdown.htm”>this website</a> for information on remote shutdown/reboots using the Windows shutdown command.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following