Results 1 to 7 of 7

Thread: Restarting a win 2k computer from the command line?

  1. #1

    Restarting a win 2k computer from the command line?

    I cant find any info for this withoud installing some app. I have a HUGE upgrade that I'm working on (50,000 PC's) and It would be really nice for some of the batch files to reboot the PC's automatically after they are done installing the components. Thanks.
    I'm trying to help a friend answer this question, yet so far I have come up short. Can anyone lend me a hand in answering his question?

    Thanks.

    /Armed

  2. #2
    Ninja Code Monkey
    Join Date
    Nov 2001
    Location
    Washington State
    Posts
    1,027
    I know you can do it via iisreset.

    iisreset /reboot
    "When I get a little money I buy books; and if any is left I buy food and clothes." - Erasmus
    "There is no programming language, no matter how structured, that will prevent programmers from writing bad programs." - L. Flon
    "Mischief my ass, you are an unethical moron." - chsh
    Blog of X

  3. #3
    I'd rather be fishing DjM's Avatar
    Join Date
    Aug 2001
    Location
    The Great White North
    Posts
    1,867
    Sysinternals has a product called PsShutdown. It's freeware, your buddy may be able to work this into his upgrade.

    PsShutdown is a command-line utility similar to the shutdown utility from the Windows 2000 Resource Kit, but with the ability to do much more. In addition to supporting the same options for shutting down or rebooting the local or a remote computer, PsShutdown can logoff the console user or lock the console (locking requires Windows 2000 or higher). PsShutdown requires no manual installation of client software.

    Hope it helps.


    Cheers:
    DjM

  4. #4
    AO übergeek phishphreek's Avatar
    Join Date
    Jan 2002
    Posts
    4,325
    Doesn't 2k also have the shutdown.exe command?

    I'm pretty sure it does. I'm on XP ATM so I can't check.

    C:\Documents and Settings\user>shutdown /?
    Usage: shutdown [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c "comment"] [-d up:xx:y
    y]

    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
    -m \\computername Remote computer to shutdown/restart/abort
    -t xx Set timeout for shutdown to xx seconds
    -c "comment" Shutdown comment (maximum of 127 characters)
    -f Forces running applications to close without warning
    -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 less than 256)
    yy is the minor reason code (positive integer less than 65536)

    C:\Documents and Settings\user>
    If not, you can get it from the win2k resource kit.

    http://www.petri.co.il/download_free_reskit_tools.htm

    Shutdown.zip
    Quitmzilla is a firefox extension that gives you stats on how long you have quit smoking, how much money you\'ve saved, how much you haven\'t smoked and recent milestones. Very helpful for people who quit smoking and used to smoke at their computers... Helps out with the urges.

  5. #5
    Senior Member nihil's Avatar
    Join Date
    Jul 2003
    Location
    United Kingdom: Bridlington
    Posts
    17,188
    If that 50,000 really is FIFTY THOUSAND? then I would say that you need an app. Most I ever did was just under 7,000 (seven thousand). With an app. you write a script that includes all required re-boots.

    You have not given much information? is this going to be done via remote management or what? how many in the largest block? what are the timescales, how long does the upgrade take, do you need admin rights, and so on.

    Cheers

  6. #6
    phishphreek80:

    He went with your suggestion of shutdown.exe, so thanks.

    nihil:

    He didn't give me too much info, but he claims shutdown.exe is gonna do it for him.

    Thankyou all for responding with great suggestions.

    /Armed

  7. #7
    Elite Hacker
    Join Date
    Mar 2003
    Posts
    1,407
    This thread should give him some help with shutdown.exe:
    http://www.antionline.com/showthread...082#post676374

    I think if his network has a good naming scheme like
    computer1 = HS1
    computer2 = HS2

    he could do a batch file with some sort of for loop to send the command to each computer incrementing the last number. I don't know that much about .bat files so I don't know if they have for loops. Just a suggestion.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •