• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Shutdown script/batch

Goatmansons

Limp Gawd
Joined
Sep 5, 2002
Messages
222
I am an Intern here at my college and I have a question for anyone out there who would like to help me with a little project that I am trying to do. I know that you can create batch files to shutdown computers. I am trying to find out a way to shutdown all the comptures in the lab without going to every single one and going to shutdown. It will be much easier and much faster to do it this way and i know that the last IT guy had a script/batch file that shutdown row by row. If anyone knows how to do this it would be a great help to me. Thank you
 
um well the batch file to shutdown one computer would be
shutdown -s

or if you wanted a specific time where 1 digit is 1 sec
shutdown -s -t 30
and that would be in 30 seconds...but I'm not sure how to shutdown computers remotely with it.

edit: take a look here for more info.
 
Code:
C:\>shutdown /?
Usage: shutdown [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c "c
omment"] [-d up:xx:yy]

        No args                 Display this message (same as -?)
        -i                      Display GUI interface, must be the first option
        -l                      Log off (cannot be used with -m option)
        -s                      Shutdown the computer
        -r                      Shutdown and restart the computer
        -a                      Abort a system shutdown
        [b]-m \\computername       Remote computer to shutdown/restart/abort[/b]
        -t xx                   Set timeout for shutdown to xx seconds
        -c "comment"            Shutdown comment (maximum of 127 characters)
        -f                      Forces running applications to close without war
ning
        -d [u][p]:xx:yy         The reason code for the shutdown
                                u is the user code
                                p is a planned shutdown code
                                xx is the major reason code (positive integer le
ss than 256)
                                yy is the minor reason code (positive integer le
ss than 65536)
it would seem the shutdown command has the ability to shutdown remote machines, but i don't know how it deals with username/password
 
Well I have a feeling that I can just use the shutdown command but I need to get the administrator logon info and my teacher is out to lunch so I will have to wait.
 
not sure if anyone cares but I was able to write at batch file to shutdown the computers row by row. Here is an example of that batch file incase anyone is wondering how I accomplished this.

shutdown -s -t 5 -m \\wk07
shutdown -s -t 5 -m \\wk08
shutdown -s -t 5 -m \\wk09
shutdown -s -t 5 -m \\wk10
shutdown -s -t 5 -m \\wk11
shutdown -s -t 5 -m \\wk12

Anyways, figured i would post this. FYI, you have to have adminsitrative rights for this.
 
Back
Top