Solved

Shutdown script for Windows 2003 servers.

Posted on 2008-10-15
4
1,395 Views
Last Modified: 2012-05-05
I have 21 servers that I wish to shutdown but initiating a shutdown script.  However I am stuck on two things;

A) Should I use Vbscript or a simple batch file

B) Depending on the answer above what is the exact syntaxt that will work?    

I have a rudimentary understanding of the shutdown command (eg. shutdown -f -t 00] but I am not quite sure how to send this to remote machine  but I know the functionality is there.  Thanks you.
0
Comment
Question by:every1isevil2
  • 2
  • 2
4 Comments
 
LVL 2

Expert Comment

by:mikef147
ID: 22723464
The /m \\servername is the switch to specify another compuer.
0
 
LVL 4

Author Comment

by:every1isevil2
ID: 22723495
Would you be able to create an exact syntax sample for me?  And how can I add multiple servers to that?

/m \\servername /m \\servername  OR /m \\servername \\servername

Thanks again.
0
 
LVL 2

Accepted Solution

by:
mikef147 earned 150 total points
ID: 22723526
I believe you can only specify 1 server at a time per line, so if you wanted to script for 21 servers you could use a simple batch file and do, for example

shutdown /m \\server1
shutdown /m \\server2
etc

If you want a specific time delay, you can add in /t xxx (# of seconds).   If you want them to shutdown and reboot, add the /r switch.  

For example, this should shutdown and reboot server1 after 60 seconds:   shutdown /r /t 60 /m \\server1

0
 
LVL 4

Author Closing Comment

by:every1isevil2
ID: 31506400
Great thank you.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick step-by-step overview of installing and configuring Carbonite Server Backup.
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question