Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1408
  • Last Modified:

Shutdown script for Windows 2003 servers.

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
every1isevil2
Asked:
every1isevil2
  • 2
  • 2
1 Solution
 
mikef147Commented:
The /m \\servername is the switch to specify another compuer.
0
 
every1isevil2Author Commented:
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
 
mikef147Commented:
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
 
every1isevil2Author Commented:
Great thank you.
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now