Shutdown script for Windows 2003 servers.

Posted on 2008-10-15
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.
Question by:every1isevil2
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2

Expert Comment

ID: 22723464
The /m \\servername is the switch to specify another compuer.

Author Comment

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.

Accepted Solution

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

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


Author Closing Comment

ID: 31506400
Great thank you.

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

624 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