Results 1 to 8 of 8

Thread: remote shutdown script/tool

  1. #1
    Member
    Join Date
    Nov 2007
    Posts
    167
    Thanks
    33
    Thanked
    1 time in 1 post

    remote shutdown script/tool

    Hi guys,

    I’m after a program or a script which at a certain time on set days (Monday - Friday @ 6:30) that will send from a server or computer system will sent out a signal across the whole network shutting down the computer in idle , logged off, sleep or locked state ( basically any system that is running). Does such thing exist if??? i dont mind linux or windows based anything that will do the job

    Thanks guys

  2. #2
    Senior Member burble's Avatar
    Join Date
    May 2007
    Location
    Olney
    Posts
    1,138
    Thanks
    8
    Thanked
    90 times in 89 posts

    Re: remote shutdown script/tool

    Ignoring the obvious question of why a weekly reboot is necessary...

    For Windows machines you could use the 'shutdown' command - have a look in the Windows 2003 resource kit.

    D:\>shutdown
    Usage: shutdown [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c "comment"] [-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
    -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)

    D:\>

    For linux machines one option would be to either run the command from a linux machine or have Cygwin installed on a Windows box. You can then pass commands using ssh. For example:

    Code:
    ssh username@servertoberebooted shutdown -r now "Scheduled reboot"
    Or some variant using sudo. Obviously this requires that you can login to the box using 'username' without being prompted for a password, have a read of public/private key authentication (the ssh-keygen command is your friend) to get that working.

  3. #3
    Member
    Join Date
    Nov 2007
    Posts
    167
    Thanks
    33
    Thanked
    1 time in 1 post

    Re: remote shutdown script/tool

    well in ourt company people leave there machines on overnight which costs us money we want a simple soloution that will shutdown all the machines at a certain time each night saving us a bit of money. all the office machines are running win xp/win7/vista. I have played about with the shutdown commands for windows and it doesnt seem to work i would set it locally to shutdown my machine at a ceretain time lock my machine expecting it to be shutdown when i returned and it is still running. maybe there is a little program out there that will do the trick

  4. #4
    Senior Member burble's Avatar
    Join Date
    May 2007
    Location
    Olney
    Posts
    1,138
    Thanks
    8
    Thanked
    90 times in 89 posts

    Re: remote shutdown script/tool

    As long as you're running the shutdown command using an account that is an administrator on the machines you want to shut down then it should work. For me anyway it works fine, I've got one particular 2003 server (which is due to be retired in a few weeks) that never shuts down without a kick from the shutdown command.

  5. #5
    Member
    Join Date
    Nov 2007
    Posts
    167
    Thanks
    33
    Thanked
    1 time in 1 post

    Re: remote shutdown script/tool

    hmmm i shall have another play and see if i can get it to work

  6. #6
    jim
    jim is offline
    HEXUS.clueless jim's Avatar
    Join Date
    Sep 2008
    Location
    Location: Location:
    Posts
    11,457
    Thanks
    613
    Thanked
    1,645 times in 1,307 posts
    • jim's system
      • Motherboard:
      • Asus Maximus IV Gene-Z
      • CPU:
      • i5 2500K @ 4.5GHz
      • Memory:
      • 8GB Corsair Vengeance LP
      • Storage:
      • 1TB Sandisk SSD
      • Graphics card(s):
      • ASUS GTX 970
      • PSU:
      • Corsair AX650
      • Case:
      • Silverstone Fortress FT03
      • Operating System:
      • 8.1 Pro
      • Monitor(s):
      • Dell S2716DG
      • Internet:
      • 10 Mbps ADSL

    Re: remote shutdown script/tool

    You might want to try psshutdown from the Server 2008 resource kit, it's meant to be a lot more effective than the shutdown command.

    Having said that, I've never been able to get any of them to work, so I'm giving up for the time being.

  7. #7
    Member
    Join Date
    Nov 2007
    Posts
    167
    Thanks
    33
    Thanked
    1 time in 1 post

    Re: remote shutdown script/tool

    hmmm when there is about 300-400 machines in the building putting in lines of commands will be a long and painful process im gonna have a look and see what google gets me.

  8. #8
    Senior Member burble's Avatar
    Join Date
    May 2007
    Location
    Olney
    Posts
    1,138
    Thanks
    8
    Thanked
    90 times in 89 posts

    Re: remote shutdown script/tool

    It's been ages since I used it, but doesn't Dameware let you see a list of machines, select a bunch of them and power them off?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. The Windows TV and/or Remote Control my PC thread
    By badass in forum PC Hardware and Components
    Replies: 17
    Last Post: 20-10-2009, 01:14 PM
  2. Replies: 12
    Last Post: 10-05-2007, 01:35 PM
  3. Remote Desktop help with IP address
    By Proplus in forum Networking and Broadband
    Replies: 3
    Last Post: 28-03-2004, 05:28 PM

Posting Permissions

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